Laravel Interview Questions

In this tutorial learn of laravel to face the interview questions. 

Laravel is a free open source "PHP framework" based on the MVC(Model View Controller) design pattern.
It is created by Taylor Otwell. 

Latest Versions

  • Laravel 5.8 – February 26th, 2019, 6 months of bug fixes, 1 year of security
  • Laravel 6.0 (LTS) -Sept 3rd, 2019

1. What is the laravel framework?

It is a free, open-source and powerful PHP framework that works based on  the MVC( model–view–controller) design pattern. 
It is a very popular framework which is developed in PHP, and that reduces the cost of development and improves code quality. 


Features of Laravel
Unit testing

Homestead
Eloquent ORM
Query builder available
Reverse routing
Restful controllers
Migrations
Database Seeding
Automatic pagination

2. What are the server requirements for Laravel 5.8?

PHP version >= 7.2.0
JSON PHP Extension
BCMath PHP Extension
Ctype PHP Extension
Mbstring PHP Extension
XML PHP Extension.
Tokenizer PHP Extension
OpenSSL PHP Extension
PDO PHP Extension

3. How we can install Laravel by composer?

linux steps

Step 1 − Visit the following URL and download composer to install it on your system.

https://getcomposer.org/download/

Step 2 - Now you can create project of Laravel

//create project  to /var/www/html   project name panel


CMD : composer create-project --prefer-dist laravel/laravel panel
// go to the project folder and  run this command

CMD : php artisan serve
4. What is middleware in Laravel?
In Laravel, middleware operates as a bridge and filtering mechanism between a request and response. It verifies the authentication of the application users and redirects them according to the authentication results. 

Example
// Syntax

php artisan make:middleware MiddelwareName

// Example
php artisan make:middleware CategoryMiddelware

Now CategoryMiddelware.php file will create in app/Http/Middleware


                                                


No comments:

Post a Comment

how to call ssh from vs code

 To call SSH from VS Code, you can use the built-in Remote Development extension. This extension allows you to open a remote folder or works...