By OnlineInterviewQuestions com Php laravel Interview Questions What is Laravel?

Download 39.11 Kb.
View original pdf
Size39.11 Kb.
1   2   3   4   5   6   7   8   9

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 is dependency injection in Laravel ?
In software engineering, dependency injection is a technique whereby one object supplies the dependencies of another object. A dependency is an object that can be used (a service. An injection is the passing of a dependency to a dependent object (a client) that would use it. The service is made part of the client’s state Passing the service to the client, rather than allowing a client to build or find the service, is the fundamental

requirement of the pattern.
You can do dependency injection via Constructor, setter and property injection.
What are Laravel Contract’s ?
Laravel's Contracts are nothing but a set of interfaces that define the core services provided by the Laravel framework.
Read more about laravel Contract’s
Explain Facades in Laravel ?
Laravel Facades provides a static like an interface to classes that are available in the application’s service container. Laravel self-ships with many facades which provide access to almost all features of Laravel s.
Laravel facades serve as static proxies to underlying classes in the service container and provide benefits of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods of classes. All of Laravel’s facades are defined in the Illuminate\Support\Facades namespace. You can easily access a facade like souse Illuminate\Support\Facades\Cache;
Route::get('/cache', function () return Cache::get('key');

Download 39.11 Kb.

Share with your friends:
1   2   3   4   5   6   7   8   9

The database is protected by copyright © 2022
send message

    Main page