What is Facade and how it can be used in Laravel?
The facade gives the “static” interface to all the classes available in the service container of the application. Laravel comes along with many interfaces that provide the access to almost all the features of Laravel.
All the facades are defined in the namespace Illuminate\Support\Facades
for easy accessibility and usability.
Example
use Illuminate\Support\Facades\Cache;
Route::get('/cache', function () {
return Cache::get('PutkeyNameHere');
});
Suggest An Answer
No suggestions Available!