Method Illuminate\Translation\Translator::getFromJson does not exist

Hy Prasanth

The Lang::get and Lang::getFromJson methods have been consolidated in laravel . Calls to the Lang::getFromJson method should be updated to call Lang::get.

You should run the php artisan view:clear Artisan command to avoid Blade errors related to the removal of Lang::transChoice, Lang::trans, and Lang::getFromJson.

Thank you.


Try php artisan view:clear

The issue is that your view files have been compiled in 5.8, so @lang has compiled to Lang::getFromJson which has now been removed.


If php artisan view:clear doesn't work on debian server, maybe permission is denied.

Try sudo rm storage/framework/views/*

Tags:

Php

Laravel