mardi 24 mars 2020

how to send data from controller to include/header blade file but return another blade file in laravel

I want to include send my data from my controller to my header.blade.php file in view but i want to return the other view in the laravel as mentioned below:-

public function handleProviderCallback()
    {

             $user = Socialite::driver('google')->stateless()->user(); 

             $finduser = User::where('google_id', $user->id)->first();

            if($finduser){

                Auth::login($finduser);
               $google_avatar = $user->getAvatar();
 view('pages.home',['google_avatar', $google_avatar]);  
                return redirect()->route('home',);      

            }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire