In this tutorial we are providing some set of frequently asked Basic Laravel Interview Questions. We have included most commonly asked entry level interview questions. Read PHP Interview Questions and Answers.
What is Laravel?
Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the modelâ€“viewâ€“controller architectural pattern and based on Symfony.
What developed the Laravel?
When Laravel was launched?
What is current stable version of Laravel?
Version 5.6.12 / March 14, 2018
In which programming language it was written?
What is offical website URL of Laravel?
Is Laravel an Open Source?
Yes, download the framework and use as per your requirement
How to install Laravel?
We can install the Laravel in following ways.
Via Laravel Installer
Via Composer Create-Project
What are the feature of Laravel5.0?
New directory structure
Multiple file system
What are the system requirements for installation of Laravel 5.6 (latest version)?
PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension
Where Libs are stored in Laravel?
All libs and packages stored in vendor/ directory.
What is ORM and which ORM are using By laravel?
Object-relational Mapping (ORM) is a programming technique that help to converting data between incompatible type systems in object-oriented programming languages.The Eloquent ORM is using by Laravel.
How to check Laravel Version?
Using php artisan â€“version command to check current installed version of Laravel Framework.
What is Events in Laravel?
The event is an incident or occurrence which will detected and handled by the program.You can create event and and subscribe to listen that event, for example, You want to send an email when user has been registered, for this You will create an event and listen event using subscribe and sent email to user.
What is CRSF protection and how to disabled?
By default, CRSF(cross-site request forgery ) is on with laravel and resides in “app/Http/Middleware/VerifyCsrfToken.php”. The CRSF help to protect your website from malicious attacks. You can disabled CRSF by writing some code into VerifyCsrfToken.php file.
Which template Engine Using By Laravel?
Blade â€“ the blade is a powerful templating engine.
How to create Connection with Database?
You can create db connection using .env file or using config/database.php file.
What is Migration in Laravel?
Migration is related to database operation like creating table,updating table etc. using PHP script, All the Migrations script is stored in /database/migrations folder. The migration file have timestamp that help to artisan identify order of migration script will execute.
How do you register a Service Provider in Laravel?
You can register service provider using bootstrap/app.php file.You need to add an entry of service provider into ‘providers’ array.
How to Display SQL Query?
You can logs and display query using below code.
$queries = DB::getQueryLog();
What are the main benefit of laravel over other php framework?
Inbuilt Authentication System.
Inbuilt blade template System.
Eloquent ORM (Object Relation Mapping) with PHP active record implementation.
Laravel had “Artisan” command line tool that help to create code skeleton, migration script, scheduling process etc.