Laravel migrationsLaravel Migrations are like version control for your database, allowing a team to easily modify and share the application’s database schema. Migrations are typi ...
How to disable Laravel Eloquent timestamps?Simply add public $timestamps = false; in your model where you want disable timestamps.Example:namespace App;
use Illuminate\Database\El ...
How to use "IN" Query in Laravel ?In Laravel you can use "IN" query asUsing Eloquent$data = YourModel::whereIn('id', array(1, 2, 3))->get();
Using DB Query builder$data = DB::t ...
How to select random rows in Laravel?Sometime we have to get records from database in random order, here I am going to show some ways to get / select random records from database i ...
You can enable maintenance mode in Laravel 5, simply by executing below command.//To enable maintenance mode
php artisan down
//To disable maintenance mode
php artisan up
...
What are service providers in Laravel?Service providers are the central place of all Laravel application bootstrapping. Your own application, as well as all of Laravel’s core ser ...
Below are some official packages provided by LaravelDusk: Laravel Dusk provides an expressive, easy-to-use browser automation and testing API. By default, Dusk does not require you ...
How to get a record in Laravel by id?Use laravel Eloquent find() method toi get a record by id in Laravel below is sample usage:YourModal::find($id);
You can also use first method ...
How to zip multiple files and download in Laravel?Use Zipper package by Chumper to zip files in laravel.Install Chumper/Zipper package and add below function in your controlle ...
In this tutorial we are going to see how to create zip files in Laravel Framework.We are going to use zanysoft/laravel-zip package for file compression and backup. was zanysoft/lar ...