What is Facade in laravel and how it is used? Explain

The facade is a type of class which provides a static interface to services. Facade helps to access a service directly from the container. It is defined in the Illuminate\Support\Facades namespace. So that we can use it easily.



use Illuminate\Support\Facades\Cache;

     Route::get('/cache', function () {

     return Cache::get('PutkeyNameHere');


Suggest An Answer

No suggestions avaliable!

Latest post from Laravel Interview Questions

Ask Question