redirect with 2 ids

Posted 11 months ago by msyaukat

how do I redirect after updating when my show has 2 ids: company_id and company_branch_id.


Route::get('company/{company_id}/companybranch/{company_branch_id}', ['uses' => '[email protected]', 'as' => '']);

controller of update:

public function update(Request $request, $company_branch_id)
        $company = Company::find($company_id);
        $companybranch = CompanyBranch::find($company_branch_id);

//didn't include the middle part

 return redirect()->route('', $company->company_id, $companybranch->company_branch_id);

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.