Comments (8)
@antfig Please don't forget to use the version 3.6. 👍
from laravel-zero.
First you should include the facade:
use Illuminate\Support\Facades\Cache;
Usage:
/**
* Execute the command. Here goes the code.
*
* @return void
*/
public function handle(): void
{
Cache::put('key', 'value', 5); // Stays in cache for 5 mins.
$value = Cache::get('key');
$this->info("This is the value: $value");
}
from laravel-zero.
Please perform an composer update
and then:
php your-app-name component:install illuminate/filesystem
Your default
param is file
right ?
from laravel-zero.
@nunomaduro sorry for the delay, works like a charm ;)
Thanks :D
from laravel-zero.
with update to 3.6 I have this error:
PHP Fatal error: Uncaught InvalidArgumentException: Cache store [] is not defined.
I created the configuration file for cache like this:
config/cache.php
<?php
return [
'default' => 'file',
'stores' => [
'file' => [
'driver' => 'file',
'path' => __DIR__ . '/../storage',
],
]
];
``
from laravel-zero.
It's working now :D
I need to update and add this settings to config.php file.
thanks
from laravel-zero.
Now i'm with problems to use filesystem cache :p
That's the error:
[ReflectionException]
Class files does not exist
this is my config file:
'cache' => [
'default' => 'array',
'stores' => [
'array' => [
'driver' => 'array',
],
'file' => [
'driver' => 'file',
'path' => __DIR__ . '/../',
],
],
],
Thanks ;)
from laravel-zero.
@antfig Do you have news? Otherwise I will close this issue.
from laravel-zero.
Related Issues (20)
- Consider using Laravel Prompts HOT 3
- New Project doesn't work "Undefined variable $command" HOT 2
- [BUG] self-update from github releases not working HOT 1
- Cannot find sqlite database when upgrading HOT 3
- app:build ErrorException rename(app.phar, builds/app): the system cannot find the file specified (code 2) HOT 3
- Failing builds: "database/factories" and "database/seeders" was expected to exist HOT 1
- app:build gives the error: The system cannot find the file specified (code: 2) HOT 4
- Why is package auto-discovery is off ? HOT 4
- Site https://laravel-zero.com is down HOT 1
- website down/expired. Is this project still being worked on? HOT 1
- Website is down - domain expired? HOT 3
- laravel-zero.com is down HOT 1
- Website is not working anymore http://laravel-zero.com/ HOT 3
- Global Composer installation without commiting binary to version control?
- Using DB pagination methods inside a command throws an exception HOT 1
- On Windows, when running app:build "impossible find specified file" HOT 5
- QUEUES Call to undefined method Psr\Log\NullLogger::driver()
- Composer Warnings when installing pest-plugin-laravel HOT 3
- Can't update phpunit because of nunomaduro/collision version in the composer.json HOT 1
- console command suggestion
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-zero.