3

I have a little problem here after I renamed a method from store to save also I was renamed in the Route

Route::post('blog', 'Backend\BlogController@store');

to

Route::post('blog', 'Backend\BlogController@save');

but when I hit submit it still shows me:

Method [store] does not exist.

anyone can help me out?

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64
0x00b0
  • 343
  • 1
  • 3
  • 17
  • Clear any caches, then if that doesn't sort it, search your code base for `store`. – Jonnix Feb 27 '19 at 09:09
  • still not working, i've been clear all caches with `php artisan route:clear` and search in `App` directory but didn't found match with 'store' ... any solution ? – 0x00b0 Feb 27 '19 at 09:12
  • Can you please tell me if by any chance you've used Resource Route like this `Route::resource('blog', 'BlogController');` – Vipertecpro Feb 27 '19 at 09:16

6 Answers6

4

Run the following command.

composer dump-autoload -o

if the problem persists, please use below commands also

php artisan config:clear
php artisan cache:clear
php artisan view:clear

Hope it will help.

Dev Ramesh
  • 353
  • 1
  • 12
  • still not working, but when i tried to renamed the method again to `store` it's working again ... though `store` doesn't appear in `Route` – 0x00b0 Feb 27 '19 at 09:17
  • 1
    You can try below commands to solve the problem. **php artisan optimize** , **php artisan cache:clear** , **php artisan route:cache** , **php artisan view:clear** , **php artisan config:cache** – Dev Ramesh Feb 27 '19 at 09:23
1

Just run this command for Clear Route cache: php artisan route:cache

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64
0

Clear your laravel cache using this command:

php artisan cache:clear
Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64
PHP Geek
  • 3,949
  • 1
  • 16
  • 32
0

Please run below command

php artisan route:clear
php artisan config:clear
php artisan cache:clear
AddWeb Solution Pvt Ltd
  • 21,025
  • 5
  • 26
  • 57
0

Please see Accessing Laravel .env variables in blade

for detail list of commands to resolve any kind of cache issues as this one.

Abhay Maurya
  • 11,819
  • 8
  • 46
  • 64
0

SOLVED

Apparently, my mistake is put "route :: resource" at the bottom, then I just deleted it.

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64
0x00b0
  • 343
  • 1
  • 3
  • 17