Skip to content

Instantly share code, notes, and snippets.

@faizalanwar
Created December 27, 2022 05:58
Show Gist options
  • Save faizalanwar/e9afb05ec93ef6735e3daadedefba9ce to your computer and use it in GitHub Desktop.
Save faizalanwar/e9afb05ec93ef6735e3daadedefba9ce to your computer and use it in GitHub Desktop.
return with variable laravel
return redirect()->route('Merchant view')->with( ['merchant' => $merchant] );
Try one of following
return redirect()->back()->with(compact('fee'));
or
return redirect()->back()->with('fee', $fee);
return redirect('/satker/print_warrent/' . $id)->with('success', 'Berhasil Membuat Surat.');
or
return redirect()->route('/satker/print_warrent/')
->with(compact('id'))
->with('success','Berhasil Membuat Surat');;
or
return redirect()->route('/satker/print_warrent/')
->with('id', $id)
->with('success','Berhasil Membuat Surat');;
@if (Session::has('metadata'))
@endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment