vendredi 29 juillet 2016

Cache facade not working in Laravel 5

I have following code located in App/Http/Helpers/helpers.php:

<?php 
use Illuminate\Support\Facades\Cache;

function putIntoCache(){
    Cache::put('foo', 'bar');
}

When calling putIntoCache() function somewhere, I get the following message:

Fatal error: Call to a member function put() on a non-object in D:\www\project\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 216

How to fix this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire