Skip to main content

Lumen framework

What is Lumen?
Lumen is PHP micro framework that built on  Laravel's top components.It is created by Taylor Otwell. It is perfect option for building Laravel based micro-services and  fast REST API's. It's one of the fastest micro-frameworks available .
Top Laravel Interview questions and answers for Fresher and Experienced

Popular posts from this blog

Laravel Interview questions and answers

Latest Laravel Interview Questions and Answers Here are some comman Laravel interview questions list.

1. What is Laravel ?
Laravel is free open source “PHP framework” based on MVC Design Pattern . It is created by Taylor Otwell. Laravel provides expressive and elegant syntax that helps in creating a wonderful web application easily and quickly.

2. List some official packages provided by Laravel?
CashierEnvoyPassportScoutSocialite 3. List out latest features of Laravel.
Inbuilt CRSF (cross-site request forgery ) Protection.Inbuilt paginationsReverse RoutingQuery builderRoute cachingDatabase MigrationIOC (Inverse of Control) Container Or service container. 4. List out some benefits of Laravel over other Php frameworks. 
Setup and customization process is  easy and fast as compared to others.Inbuilt Authentication System.Supports multiple file systemsPre-loaded packages like Laravel Socialite, Laravel cashier, Laravel elixir,Passport,Laravel Scout.Eloquent ORM (Object Relation Mapping) wi…

What is reverse routing in laravel

In Laravel reverse routing is generating URL's based on route declarations.Reverse routing makes your application so much more flexible.
For example the below route declaration tells Laravel to execute the action “login” in the  users controller when the request’s URI is ‘login’.
Route::get(‘login’, ‘users@login’);
Using reverse routing we can create a link to it and pass in any parameters that we have defined. Optional parameters, if not supplied, are removed from the generated link.
{{ HTML::link_to_action('users@login') }}

 It will create a link like in view

Getting records between two date in larvael eloquent

How to get records between two dates using Eloquent in Laravel5 ?
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 $posts; 

Top Laravel Interview questions and answers for Fresher and Experienced