Laravel facades

Share:
What are laravel facades?
Laravel Facades provides a static like 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 provides 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 so:

use Illuminate\Support\Facades\Cache;

Route::get('/cache', function () {
    return Cache::get('key');
});
Here is Step by step guide to create custom Face in Laravel 5.4


Top Laravel Interview questions and answers for Fresher and Experienced 

No comments