Skip to content

Instantly share code, notes, and snippets.

@Sairahcaz
Last active November 24, 2023 15:27
Show Gist options
  • Save Sairahcaz/a5e703df024cced1fa107d76dd45837c to your computer and use it in GitHub Desktop.
Save Sairahcaz/a5e703df024cced1fa107d76dd45837c to your computer and use it in GitHub Desktop.
#!/bin/sh
# creates app/Http/Requests/StorePersonRequest.php (store request is the default)
php artisan schema:generate-rules persons --create-request
# creates/overwrites app/Http/Requests/StorePersonRequest.php
php artisan schema:generate-rules persons --create-request --force
# creates app/Http/Requests/UpdatePersonRequest.php
php artisan schema:generate-rules persons --create-request --file UpdatePersonRequest
# creates app/Http/Requests/Api/V1/StorePersonRequest.php
php artisan schema:generate-rules persons --create-request --file Api\\V1\\StorePersonRequest
# creates/overwrites app/Http/Requests/Api/V1/StorePersonRequest.php (using shortcuts)
php artisan schema:generate-rules persons -cf --file Api\\V1\\StorePersonRequest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment