Call to undefined method after upgrading to laravel 5.4

After upgrading packages and Laravel to 5.4 , you should run **

php artisan view:clear

** to avoid the mentioned error. further more you may run **

php artisan route:clear

** to flush the route cache. Additionally , you may run

php artisan optimize

at last.


Delete all files from this path

{project_root}\storage\framework\views

Or Run this in console

php artisan view:clear

  1. php artisan cache:clear

    Flush the application cache

  2. composer dump-autoload

    Generate autoload files

  3. php artisan view:clear

    Clear all compiled view files


Clear your compiled blade views.

php artisan view:clear