Laravel facades

What are laravel facades? Laravel Facades provides a static like interface to classes that are available in the application’s service container. Laravel self ships with many facades which provide access to almost all features of Laravel’s . Laravel facades serve as “static proxies” to underlying classes in the service container and provides benefits of a […]

Read More

Route grouping in laravel

Grouping Routes in laravel Sharing common requirements or attributes, such as middleware or namespaces with large number of routes needs you  to define those attributes on each individual route.Route groups allow you to share those attributes using Route::group method.You can pass these attribute as first argument of method. Examples:-Using Middleware in Route Route::group([‘middleware’ => ‘auth’], […]

Read More

Benefits of Laravel over other Php frameworks

Laravel benefits over other php framework Setup and customization process is  easy and fast as compared to others. Inbuilt Authentication System. Supports multiple file sytems Pre-loaded packages like Laravel Socialite, Laravel cashier, Laravel elixir,Passport,Laravel Scout. Eloquent ORM with PHP active record implementation.  Built in command line tool “Artisan” for creating a code skeleton ,database structure […]

Read More

Answered : How to get records between two date in Laravel using eloquent

laravel where date between laravel eloquent between dates We can get records between two dates laravel5 with using Eloquent “whereBetween” method. Here sample function to get posts between two dates from database. public function getPosts(){ $fromDate = date(‘Y-m-d’ . ‘ 00:00:00’, time()); $toDate = date(‘Y-m-d’ . ‘ 22:00:40’, time()); $posts = POST:: where(‘user_id’,$this->user_id)->where(‘status’,1)->whereBetween(‘posted_on’,[$fromDate, $toDate])->get(); return […]

Read More