Support the ongoing development of Laravel.io →
posted 9 years ago
Session Cache
Last updated 2 years ago.
0
Solution

I guess you need to use a 'use' statement in your class. As I am a beginner myself and not yet so familiar with Laravel 5, I'd suggest to try a

use Session

http://stackoverflow.com/questions/27126972/laravel-5-0-session-cant-use-static-methods

The second method works, because it is a helper method and essentially everwhere (including blade templates) by default available. Use it, if it suits you, there is absolutely no downside to using it. Only, not all methods are available as helpers and for sure not all methods are mentioned in the docs...

http://laravel.com/docs/5.0/helpers

The same goes for the cache. Hope that helps.

Btw, the driver should not matter. But thanks for posting.

Last updated 9 years ago.
0

ok so adding use Session; looks like it fixed the session issue but still getting the same error for the cache. Will look into this more when i get some time. Thanks for getting me started in the right path. Will keep you posted on the results.

Citti

0

So I just needed to import the facade class into my controller. so: use Session; use Cache;

problems are now solved.

Thanks Citti

0

Sign in to participate in this thread!

Eventy

Your banner here too?

citti citti Joined 26 Feb 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.