Question: What is Laravel?
Laravel is a free and open-source PHP framework that follows the model–view–controller design pattern.
Question: What is the latest version of Laravel?
7.0, released on 3rd March 2020.
Question: Who created Laravel?
Taylor Otwell
Question: Who created Laravel?
Taylor Otwell
Question: What language does Laravel use?
PHP
Question: Which is the best IDE for Laravel?
Netbeans,
PhpStorm,
Atom,
Sublime Text
Question: Features of Laravel?
- Eloquent ORM
- Reverse routing
- Restful controllers
- Migrations
- Unit testing
- Automatic pagination
- Database Seeding
- Query builder available
Question: What are the new features of Laravel 7?
Laravel 7.0 is incorporated features such as Better routing speed, Laravel Airlock, Custom Eloquent casts, Fluent string operations, CORS support, and many more features like below.
- Custom Eloquent Casts
- Route Caching Speed Improvements
- HTTP Client
- Query Time Casts
- Blade Component Tags & Improvements
- Laravel Airlock
- CORS Support
- Fluent string operations
- Multiple Mail Drivers
- New Artisan Commands etc
Question: How to extend login expire time in Auth?
Open config\session.php file and add/update following key's value.
'lifetime' => 180
Question: What is middleware in Laravel?
Middleware operates as a bridge and filtering mechanism between a request and response.
Question: How to pass CSRF token with ajax request?
In between head, tag put
[meta name="csrf-token" content="{{ csrf_token() }}"]
In Ajax, we have to add
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } });
Question: What is laravel Service container?
Service Container is a powerful tool which is used to manage class dependencies and perform dependency injection. Also known as the IoC container.
Question: How to use session in laravel?
Retrieving Data from session
session()->get('key');
Retrieving All session data
session()->all();
Remove data from session
session()->forget('key');
Storing Data in session
session()->put('key', 'value');