This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Garfild
Garfild

Is there any way of usage native Laravel Facades? For example, I want to use Cache::put() or Cache::forget().

And in addition, I want to use scheduler to run some tasks.

I need to parse some information every 10 minutes and write it into html file. How can I realize this?

Thank you in advance.

Last updated

Scott
Scott

Just stick a use statement at the top of your class

use Cache;
// use DB, use Session, use Cookie, etc...

Last updated

Garfild
Garfild

Scott said:

Just stick a use statement at the top of your class

use Cache;
// use DB, use Session, use Cookie, etc...

This is the result:

The use statement with non-compound name 'Cache' has no effect /home/new_nosgoth/public_html/modules/cms/classes/CodeParser.php(189) : eval()'d code line 2

Garfild
Garfild

I found the solution. I used like this:

\Cache::put('key', 'value');

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.