Last active
May 16, 2020 11:28
-
-
Save vijayrami/3caceafedf20173cff12f1b4b288ae16 to your computer and use it in GitHub Desktop.
Laravel Basic Stuff
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
| go to htdocs directory and run: | |
| composer create-project --prefer-dist laravel/laravel laravel | |
| php artisan serve | |
| Go to | |
| App\Providers\AppServiceProvider | |
| add below line at the begining. | |
| use Illuminate\Support\Facades\Schema; | |
| and in function boot add: | |
| public function boot() | |
| { | |
| Schema::defaultStringLength(191); | |
| } | |
| ====================================== | |
| composer require laravel/ui | |
| // Generate basic scaffolding... | |
| php artisan ui bootstrap | |
| php artisan ui vue | |
| php artisan ui react | |
| // Generate login / registration scaffolding... | |
| php artisan ui bootstrap --auth | |
| php artisan ui vue --auth | |
| php artisan ui react --auth | |
| npm install && npm run dev | |
| ===================================== | |
| php artisan make:migration create_employees_table --create=employees | |
| php artisan make:migration add_paid_to_users_table --table=users | |
| php artisan migrate | |
| php artisan migrate:rollback --step=1 | |
| php artisan make:factory RoleModelFactory.php --model=Role | |
| php artisan make:seed EmployeesTableSeeder | |
| In DatabaseSeeder.php add line: | |
| $this->call(EmployeesTableSeeder::class); | |
| then | |
| composer dump-autoload | |
| php artisan db:seed --class=EmployeesTableSeeders | |
| composer dump-autoload | |
| ===================================== | |
| if config files changes not working then run below commands: | |
| php artisan config:cache | |
| php artisan config:clear | |
| =============file permissio============ | |
| find ./ -type d -exec chmod 755 -R {} \; | |
| find ./ -type f -exec chmod 644 {} \; | |
| https://stackoverflow.com/questions/40756665/how-to-make-public-folder-as-root-in-laravel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment