- Prerequisite
- Install XAMP
- Install Composer
- Installation
- Run gitbash
- composer create-project –prefer-dist laravel/laravel [projectname]
- For existing code and want to install the dependencies, just use the below command
- composer install
- Edit host domain
- Setup database
- Create database via phpmyadmin
- localhost/phpmyadmin
- create migration script from terminals
- php artisan make:migration create_articles_table –create=articles
- Create seeder
- php artisan make:seeder ArticlesSeeder
- Create factory
- php artisan make:factory ArticleFactory
- Create model
- php artisan make:model Article
- Run the migration
- php artisan migrate
- php artisan db:seed
- Create database via phpmyadmin
- Install passport package for authentication module
- php artisan passport:install
- https://laravel.com/docs/5.8/passport#installation
- Run the application
- php artisan serve
- Run gitbash
- Install Database in centos
- yum install mysql -> this command will install mariadb
- yum list installed | grep mariadb -> check the condition
- yum install mairadb-server -> install maria db servre
- systemctl start mariadb -> to start service
- Reference
- https://stackoverflow.com/questions/31067135/in-centos7-can-not-start-mysql
- Test database using putty
- [server]$ mysql -h <DBhostname> -u <DBuser> -p <DBname>
- show tables
- Database create and migration
- Create new migration script with New table
- php artisan make:migration create_users_table –create=users
- Create new migration script with Updating existing table
- php artisan make:migration add_votes_to_users_table –table=users
- Create new migration script with New table
- References
- https://www.youtube.com/watch?v=4pc6cgisbKE
- https://www.youtube.com/watch?v=GRhkhSzyApc&list=PLEhEHUEU3x5q-xB1On4CsLPts0-rZ9oos&index=10