BadMethodCallException
Method Illuminate\Translation\Translator::getFromJson does not exist.
Bad Method Call
Did you mean Illuminate\Translation\Translator::getLine() ?
I have tried by given command but it's not working for me. same error
is showing.
php artisan view:clear
php artisan view:cache
also tried by these :
php artisan config:cache
php artisan config:clear
php artisan route:clear
I have also deleted cache files from bootstrap/cache
** BUT till now It's Not Working :( **
Laravel 6+ replaced Translator getFromJson() to just get(). If you find and replace all instances that should fix the issue.
Related
When i attempt to publish kyslik/column-sortable package with the command
php artisan vendor:publish --provider="KyslikColumnSortableColumnSortableServiceProvider" --tag="config"
I get the error
In ProviderRepository.php line 208:
Class "KyslikColumnSortableColumnSortableServiceProvider" not found
following instructions from https://meritocracy.is/blog/2020/04/17/laravel-using-pagination-sorting-and-filtering-with-your-tables/
I ran into the same issue when following those instructions. It looks like there's a typo in two parts.
In config/app.php there needs to be some back slashes to properly identify the provider class. Use this instead:
Kyslik\ColumnSortable\ColumnSortableServiceProvider::class,
And same thing when running the php artisan command:
php artisan vendor:publish --provider="Kyslik\ColumnSortable\ColumnSortableServiceProvider" --tag="config"
That fixed the issue for me. I haven't made it further in the instructions yet to see if anything else needs to be adjsuted. I found the correct commands on these instructions: https://www.laravelia.com/post/laravel-9-table-sorting-example-with-pagination
i had checkAuth route in routes early and now it doesn't defined in routes because i deleted that
you can see this output:
php artisan route:list
output:
Your application doesn't have any routes matching the given criteria.
now when i try to test this route, it worked :|
192.168.1.103:8000/checkAuth
True, you are logged!!
this commands with restarting server and change host with port couldn't resolve this issue:
php artisan optimize:clear
php artisan config:cache
php artisan config:clear
php artisan clear-compiled
composer dump-autoload
we had the same problem in our project. If you had the websockets package, the problem is in the WebSocketsServiceProvider.php file.
In my package on line 49, I have the line $this->registerDashboard(); which registers routing and gateway for the dashboard from WebSockets. You can return an empty string in registerDashboardRoutes if you don't need the dashboard.
this my .env config
MAIL_PORT=587
MAIL_USERNAME=myemail#gmail.com
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls
does anyone have a solution?
thanks
I think you get value from .env file but the value was not got.I just
suggest first confirm your parameter was got value or not by using
TINKER.
php artisan tinker
and check by
env('MAIL_PASSWORD')
If you don't got the value then try to clear cache by using given
commanad.
php artisan config:cache
php artisan config:clear
php artisan cache:clear
and then try again with tinker.
im noob on laravel i'm trying to set up a custom email verification on laravel 6
i get this error
Method Illuminate\Translation\Translator::getFromJson does not exist.
i try
php artisan view:clear but didn't work for me
any help please
Method Illuminate\Translation\Translator::getFromJson does not exist
There are chances your application is still using outdated cache views. Try this
php artisan view:clear
php artisan view:cache
I am trying to roll back my migrations in Laravel 4.
When I use php artisan migrate:rollback command, I get the following error:
MacBook-Pro:laravel-master ****************$ php artisan migrate:rollback
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'CreateFansTable' not found","file":"\/Applications\/MAMP\/htdocs\/crowdsets\/laravel-master\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Migrations\/Migrator.php","line":301}}
I am not sure why this is happening. Running the migration works fine, but rolling back I am getting this error. Thank you for your help.