hi I have a problem in laravel route... I name my routes like this
Route::get('auth/facebook', ['uses' => 'FacebookController@redirectToProvider', 'as' => 'facebook.login']);
and this is my controller...
public function getRedirectToProvider()
{
return Socialite::driver('facebook')->redirect();
}
public function getHandleProviderCallback()
{
//notice we are not doing any validation, you should do it
$user = Socialite::driver('facebook')->user();
// stroing data to our use table and logging them in
dd($user);
}
my problem is always error 404 page not found when i click this button
<a class="btn btn-primary" href="{!! route('facebook.login') !!}">Facebook</a>
谢谢:)我使用laravel 5.0
1 回答
你有:
但你的Controller的方法是:
根据您发布的Controller代码 .
您可以随时通过控制台检查您的路线是通过工匠的:
如果您在确定已定义的内容或如何访问它时遇到问题 .