• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
return with multiple data

#1
Hi,

Is it possible to use return ->with() multiple data.

For example I want to return a reference to the language file AND return a new variable ($data['mydata']).

I have tried, the following  and combination thereof (with error), so I'm wondering if this can be done? 
PHP Code:
return redirect()->back()->withInput()->with('success'lang('myfile.mytext'))->with($data['mydata']);

return 
redirect()->back()->withInput()->with('success'lang('myfile.mytext'), 'newdata'$data['mydata']);

return 
redirect()->back()->withInput($data['mydata'])->with('success'lang('myfile.mytext')); 

All help is greatly appreciated
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme ¬© 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.