Last active
January 27, 2022 15:14
-
-
Save voidfire/62527de4fad914948ceaf10b22050c1a to your computer and use it in GitHub Desktop.
Create Model, Migration and Nova Resource files ./newEntity.sh modelName
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo -e "No arguments provided, \nTry: ./newEntity.sh modelname \nThe script will generate Model and migration file as well as nova resource file for you" | |
exit 1 | |
fi | |
cd ~/nova-backend | |
ENTITY=$1 | |
php artisan make:model $ENTITY -m | |
php artisan nova:resource $ENTITY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment