Sign Up

Sign In

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Explain validations in laravel?

In Programming validations are a handy way to ensure that your data is always in a clean and expected format before it gets into your database. Laravel provides several different ways to validate your application incoming data.By default Laravel’s base controller class uses a ValidatesRequeststraitwhich provides a convenient method to validate all incoming HTTP requests coming from client.You can also validate data in laravel by creating Form Request.

What is composer ?

Composer is a tool for managing dependency in PHP. It allows you to declare the libraries on which your project depends on and will manage (install/update) them for you.
Laravel utilizes Composer to manage its dependencies.

What are service providers ?

Service Providers are central place where all laravel application is bootstrapped . Your application as well all Laravel core services are also bootstrapped by service providers.
All service providers extend the Illuminate\Support\ServiceProvider class. Most service providers contain a register and a boot method. Within the register method, you should only bind things into the service container. You should never attempt to register any event listeners, routes, or any other piece of functionality within the register method.

What are pros and cons of using Laravel Framework ?

Pros of using laravel Framework

Laravel framework has in-built lightweight blade template engine to speed up compiling tasks, and create layouts with dynamic content easily.
Hassles code reusability.
Eloquent ORM with PHP active record implementation
Built in command line tool “Artisan” for creating a code skeleton ,database structure and build their migration

Cons of using laravel Framework

Development process requires you to work with standards and should have real understanding of programming
Laravel is new framework and composer is not so strong in compare to npm (for node.js), ruby gems and python pip.
Development in laravel is not so fast in compare to ruby on rails.
Laravel is lightweight so it has less inbuilt support in compare to django and rails. But this problem can be solved by integrating third party tools, but for large and very custom websites it may be a tedious task

What Are The Feature Of Laravel 5.0?

Method injection
Route caching
Events object
Multiple file system
Authentication Scaffolding
dotenv – Environment Detection
Laravel Scheduler

Compare Laravel With Codeigniter?

Laravel :

Laravel is a framework with expressive, elegant syntax
Development is enjoyable, creative experience
Laravel is built for latest version of PHP
It is more object oriented compared to CodeIgniter
Laravel community is still small, but it is growing very fast.

Codeigniter :

CodeIgniter is a powerful PHP framework
Simple and elegant toolkit to create full-featured web applications.
Codeigniter is an older more mature framework
It is less object oriented compared to Laravel.
Codeigniter community is large.

What Are Bundles,reverse Routing And The Ioc Container ?

Bundles: These are small functionality which you may download to add to your web application.
Reverse Routing: This allows you to change your routes and application will update all of the relevant links as per this link.
IoC container: It gives you Control gives you a method for generating new objects and optionally instantiating and referencing singletons.

Where do you regiser service providers?

All service providers are registered in the config/app.php configuration file. This file contains a providers array where you can list the class names of your service providers.

Which Template Engine used by Laravel?

Blade is the simple, yet powerful templating engine provided with Laravel

What is ORM?

Object-relational Mapping (ORM) is a programming technique that help in converting data between incompatible type systems into object-oriented programming languages.

What is Binding?

Within a service provider, we always have access to the container via the $this->app property. We can register a binding using the bind method, passing the class or interface name that we wish to register along with a Closure that returns an instance of the class:

What is Lumen?

  1. Lumen is a micro-framework provided by Laravel.

  2. It is developed by creator of Laravel Taylor Otwell.

  3. It is mostly used for creating RESTful API’s & microservices.

  4. Lumen is built on top components of Laravel.

What is Laravel service container?

The Laravel service container is a powerful tool for managing class dependencies and performing dependency injection. Dependency injection is a fancy phrase that essentially means this: class dependencies are “injected” into the class via the constructor or, in some cases, “setter” methods.

I just have installed a fresh version of Laravel 5, and I have the white screen of death. What’s wrong?

It’s a permissions problem. If there was a PHP problem you’d recieve a verbose message (unles debug mode was set to false) explaining the problem. Almost everyone who has used Laravel has had this permissions error at some point, but even if they have not, they should be able to figure out that there’s a permissions error.

Have you used Lumen before?

Lumen is the micro-framework by Laravel that was made by Taylor specifically for APIs and microservices. If they’ve decided to use Lumen over Larvel for a microservice or API, it shows that they care about performance.

What is Laravel Echo?

Event broadcasting, evolved. Bring the power of WebSockets to your application without the complexity.

Explain Events in laravel?

An event is an action or occurrence recognized by a program that may be handled by the program or code. Laravel events provides a simple observer implementation,that allowing you to subscribe and listen for various events/actions that occur in your application.
All Event classes are generally stored in the app/Events directory, while their listeners are stored in app/Listeners of your application.

Why Laravel over other PHP frameworks?

If they haven’t used other frameworks, that’s OK. If they answer that they haven’t used other frameworks then it’s important to dig deep into these questions. If they have used other frameworks, ask about the differences and see if they are passionate about Laravel or just have jumped on the bandwagon.

What is Laravel Dusk?

Laravel Dusk provides an expressive, easy-to-use browser automation and testing API. You’ll love it.

What is Server Requirements for Laravel 5.4 ?

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

What is Laravel Horizon?

Laravel Horizon provides a beautiful dashboard and code-driven configuration for your Redis queues.

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.

What is Laravel Lumen?

Lumen is another project from Laravel created by Taylor Otwell. Lumen is designed for microservices, it is a lightweight, smaller, faster version of the Laravel framework. Lumen is known as micro-framework by Laravel.

Lumen is basically used for building Laravel based micro-services and lightweight fastest Web API’s.

What is Laravel Guard?

Guard is a very special component that comes into picture while user authentication. The incoming request is first routed through the guard to validate the user credentials. All the inbuilt guards are defined in ../config/auth.php file.

You can also add a new Guard in Laravel.

What is Blade Template in Laravel?

Laravel framework ships with an inbuilt Blade template engine to create, organize HTML UI views in a very simple and clean manner. Laravel’s blade template provides a set of special directives to avoid using the legacy PHP code in HTML view files. Blade views are also cached.

What is Middleware in Laravel?

Laravel middleware is a series of layers wrapping around your application, like an onion. Each and every HTTP request in Laravel passes through every middleware layer on its way into the application. So, middleware is a way to protect, filter and monetize the incoming request before passed to actual business logic. One common use of middleware is protecting the routes using Auth middleware.


Middleware can inspect a request and decorate it, or reject it, based on what it finds.

What is .htaccess file in Laravel?

When the web application is hosted on Apache web server, then the .htaccess file that ships with Laravel handle the passing of all requests to index.php.

This complete list of Laravel Interview Questions would help crack the Laravel interview.

What are the fundamental concepts of Laravel?

#1. Routing – Read the detailed tutorial on Laravel Routing here

#2. Controllers


#4. Blade Template Engine

#5. Laravel Models

#6. Migrations

#7. Eloquent ORM

#8. Artisan CLI

What are the main features of Laravel?

Below is a list of core features of the Laravel framework that make it different from another PHP framework:

  • MVC support – Model-View-Controller architecture

  • Secure authentication and authorization

  • Rapid Application Development

  • Blade Template Engine for creating/managing views.

  • Eloquent ORM (object-relational mapping)

  • Query Builder

  • Migrations mechanism for Databases

  • Homestead – virtual machine

  • Bundles

  • Routing

  • Artisan language

  • Unit testing

  • External packages support.

  • Emailing facility

What is MVC in Laravel?

MVC stands for Model, View, and Controller, it is a design pattern used for developing applications having UI (User interface) component, be it a web application or Desktop application. This design pattern divides an application into three main components – Models, Views, and Controllers.
#1. Model

Represents the main business logic layer. It maintains and prepares the data based on the request from various controllers. This is not exposed to users.
#2. View

This is the UI part of an application, display layer that interacts with users. This is visible to users.
#3. Controller

A Controller is an intermediate between View and Models to control input/outputs ..more specifically saying handles application requests/responses.

What is the current version of Laravel? How to check the current version of Laravel?

The latest version of Laravel is 5.7. You can use the following Laravel artisan commands to get the version of Laravel installation:

$php artisan --version
Output - Laravel Framework version 5.2.45

What is Laravel? and its History? When was Laravel first released?

Laravel is PHP based open-source, and free web development MVC framework like other frameworks – CodeIgniter, Symfony. Laravel is now majorly used for building high-end web applications and web services for mobile applications. Laravel is MVC framework web development developed by Taylor Otwell and first released in July 2011. Laravel Framework Overview