Note: when creating a table with automatically increasing id, for example: $table->increments(‘id’); The type created in a Mysql table is
Tag: Laravel
Laravel Test HTTP Client Calls
Get a test url from https://webhook.site/ Make sure Laravel and Guzzle are installed Go to a directory where Laravel is
Laravel Add a Column to a Table
php artisan make:migration add_colName_to_tableName –table=tableName This will create migration file under the database/migration directory Update in the generated file the
Laravel Factory and Seeder
Follow the steps below to seed a database with sample data: Make factory associated with a table: php artisan make:factory
Useful Laravel Tutorials
Laravel API Tutorial: How to Build and Test a RESTful API Sample code: Laravel 5.8 from scratch click here
Laravel and Netbeans
Use Netbeans with a Laravel project on Windows Install Laravel follow instructions here or if you already have composer installed
Laravel Add An Unique Index To A Table
Execute the following command to create a migration file under the database directory in a Lavarel project: php artisan make:migration
Laravel Query Builder
A good article on DB::RAW Some general examples Racing condition: Breaking Laravel’s firstOrCreate using race conditions To solve this problem
Laravel Cronjobs
Reference: https://laravel.com/docs/5.8/scheduling#introduction Laravel task schedule is defined in the app/Console/Kernel.php file’s schedule method. Create a new Laravel project laravel new (project name)
Laravel Artisan Commands
Install and create a laravel project laravel new (project name) or composer create-project –prefer-dist laravel/laravel (project name) Install ui authentication