Monday, March 13, 2017

Laravel add method to a vendor class

In laravel we can use with() along with redirect(), like

return redirect('home')->with(['message' => 'Some message');

I want to create some other functions like withError(), withSuccess().

How and where to create this ?



via Bizzon

Advertisement