Skip to content

Instantly share code, notes, and snippets.

@voidfire
Last active January 27, 2022 15:14
Show Gist options
  • Save voidfire/62527de4fad914948ceaf10b22050c1a to your computer and use it in GitHub Desktop.
Save voidfire/62527de4fad914948ceaf10b22050c1a to your computer and use it in GitHub Desktop.
Create Model, Migration and Nova Resource files ./newEntity.sh modelName
#!/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