Last active
June 6, 2017 03:27
-
-
Save prilcool/6f56b05ea81f75979c3b4d9cfc4a38d8 to your computer and use it in GitHub Desktop.
A Laravel bat file to avoid redundantly typing the prefix " php artisan " for common Laravel artisan cli commands
This file contains hidden or 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
| @ECHO OFF | |
| CLS | |
| chdir /d C:\Xampp\htdocs\lara\specify the root directory of your laravel project here | |
| ECHO 1.Make controller | |
| ECHO 2.Make model | |
| ECHO 3.Create Migration | |
| ECHO 4.Migrate data to DB | |
| ECHO 5.Artisan Serve | |
| ECHO 6.Roll back Latest Migration from DB | |
| ECHO 7.Completely Rollback your database | |
| ECHO 8.db seeder mock data | |
| ECHO 9.Make authentication and than session table Migration file | |
| ECHO. | |
| :MENU | |
| CHOICE /C 123456789 /M "Enter your choice:" | |
| :: Note - list ERRORLEVELS in decreasing order | |
| IF ERRORLEVEL 9 GOTO makeauth | |
| IF ERRORLEVEL 8 GOTO dbseeder | |
| IF ERRORLEVEL 7 GOTO completerollback | |
| IF ERRORLEVEL 6 GOTO Migratenowrollback | |
| IF ERRORLEVEL 5 GOTO Serve | |
| IF ERRORLEVEL 4 GOTO Migratenow | |
| IF ERRORLEVEL 3 GOTO Migrate | |
| IF ERRORLEVEL 2 GOTO mmodel | |
| IF ERRORLEVEL 1 GOTO mcontroller | |
| :makeauth | |
| php artisan make:auth | |
| php artisan session:table | |
| ECHO commands executed successfully | |
| timeout 5 | |
| CLS | |
| GOTO MENU | |
| :dbseeder | |
| php artisan db:seed | |
| timeout 5 | |
| CLS | |
| GOTO MENU | |
| :completerollback | |
| php artisan migrate:reset | |
| timeout 5 | |
| CLS | |
| GOTO MENU | |
| :Migratenow | |
| php artisan migrate | |
| timeout 5 | |
| CLS | |
| GOTO MENU | |
| :Migratenowrollback | |
| php artisan migrate:rollback | |
| timeout 5 | |
| CLS | |
| GOTO MENU | |
| :Migrate | |
| set /p Inputs=Enter the name of the class that you want to migrate: | |
| php artisan make:migration %Inputs% | |
| timeout 5 | |
| CLS | |
| GOTO MENU | |
| :mmodel | |
| set /p Inputs=Enter your models name: | |
| php artisan make:model %Inputs% | |
| timeout 5 | |
| CLS | |
| GOTO MENU | |
| :mcontroller | |
| set /p Input=Enter your controllers name: | |
| php artisan make:controller %Input% | |
| timeout 5 | |
| CLS | |
| GOTO MENU | |
| :Serve | |
| php artisan serve | |
| timeout 5 | |
| CLS | |
| GOTO MENU | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment