1

When i try to remove my all cache file from laravel 5.5 project i got some error during run this command

php artisan cache:forget

Not enough arguments (missing: "key").

Md Hasibur Rahaman
  • 1,041
  • 3
  • 11
  • 34

3 Answers3

2

use command php artisan cache:forget -h for see list Arguments and options.

this is list agruments and option of cache:forget command larvel 5.4

Arguments:
  key                   The key to remove
  store                 The store to remove the key from

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

if you want remove all cache file you can run this command

php artisan cache:clear
php artisan config:cache

and see more artisan command

php artisan list
JoinCompany
  • 504
  • 2
  • 11
0

You can use

php artisan cache:clear

after key generate with this command:

php artisan key:generate
Rajesh kumar
  • 188
  • 7
0

For removing a entire Cache you can use Cache::flush(); For removing a key from Cache u can use Cache::forget('key') programmatically.

You can also use artisan console

php artisan cache:forget key="yourkey"

Hope this helps

FULL STACK DEV
  • 15,207
  • 5
  • 46
  • 66