I implement laravel/socialite with laravel 5.2 and an error occur that is :
"InvalidStateException in C:\xampp\htdocs\facebook\vendor\laravel\socialite\src\Two\AbstractProvider.php line 191:"
why was this occur and how am i solve this?
Related
The error is:
Class '\Omnipay\FirstData\Gateway' not found
after request Omnipay in laravel php project.
I've created a new Laravel 8 app with Jetstream and Livewire. When I make a GET request to any view an ErrorException is launched with message
Trying to get property 'user_id' of non-object
on navigation-dropdown.blade.php which is automatically generated by Jetstream\Livewire. I've looked for this user_id and didn't found on any part of the code.
Check that if user has team in the blade view.
resources/views/navigation-dropdown.blade.php
In line 61:
- #if (Laravel\Jetstream\Jetstream::hasTeamFeatures())
+ #if (Laravel\Jetstream\Jetstream::hasTeamFeatures() && Auth::user()->current_team_id)
In line 162:
- #if (Laravel\Jetstream\Jetstream::hasTeamFeatures())
+ #if (Laravel\Jetstream\Jetstream::hasTeamFeatures() && Auth::user()->current_team_id)
Fortify adds it's own auth routes, but old routes in config/auth.php will still be used (in my case)
Simple solution is to comment out all routes in config/auth.php (if using jetstream with fortify)
and run :
php artisan route:cache
this will make sure that auth routes use fortify actions, so each new account you create will have team created
I got an error Class 'App\Http\Controllers\Debugbar' not found after trying to use in controller action Debugbar::error('Error!');
LARAVEL DEBUGBAR WAS INSTALED IN THIS WAY:
in console composer require barryvdh/laravel-debugbar
in config/app.php adding Barryvdh\Debugbar\ServiceProvider::class and 'Debugbar' => Barryvdh\Debugbar\Facade::class,
Laravel 5.3
Debugbar is working in the website - I can see it at the bottom even after this error. But how to fix this critical error message?
Either explicitly use the Facade or use Debugbar from the root namespace.
\Debugbar::error('hi');
// OR
use \Debugbar;
Debugbar::error('hi');
// OR
use Barryvdh\Debugbar\Facade as Debugbar;
Debugbar::error('hi');
do i need to use some namespaces or something?
here's the code:
$response = $this->call('POST', 'admin/apps/list', []);
$this->seeJsonStructure([...]);
seeJsonStructure is not available until Laravel 5.2.
You need to upgrade the Laravel version to 5.2.
Since Laravel 5.4, it has been renamed to assertJsonStructure().
I have a little project on Laravel 5.1
And I updated it to 5.2
And now I get this error from my model:
Class 'Input' not found
And this is the code :
if ( \Input::get('angular') ) { ... }
And where do I find it in the documentation ?
I'm new with Laravel
And I didn't find it
Thanks for the help
You need to use:
\Request::input('angular')
instead of
\Input::get('angular')
Reference: Laravel 5.2 Request documention