mercredi 25 mars 2020

How to Redirect using two parameter in Controller using Laravel 5.5

Controller is :

 elseif ($profile_is_exsit > '0') 
        {
            $url = DB::table('marriage_bureau')->select('title','custom_id')->where('user_id',$user_id)->first();
            $title = $url->title;
            $custom_id = $url->custom_id;
           return redirect('marriage-bureau/{title}/{custom_id}');              
        }

This return redirect is generating Error. I need to generate a URL followed by the following route.

Routes in web.php

Route::get('marriage-bureau/{title}/{id}','marriage_bureau\ViewMarriageBureauController@index');


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire