Support the ongoing development of →
posted 9 years ago
Last updated 1 year ago.

Print something inside Try or Catch block...just to make sure where's the error coming

Last updated 1 year ago.

I did . I tried either side of the if block. I can var_dump or dd() in the try , catch and in the if block , If I return a redirect from the if block it works if I return a string it shows on the page but If I just set the session values weather the person is subscribed or not it fails yet I've written another package for OAuth2-server and I have filters that don't return any thing and they work fine so Im really stuck as to me I can not see a error in the code above. if I add a return to the IF block to return a string i can run the filter with a subscribed user and unsubscribed user and it works Ive never triggered the catch block unless I put a error into the try block then it return the response from the catch block .

Thanks :)

Last updated 1 year ago.

Found the issue it was my route eg:

Route::get('my/',['before'=>'sbuscribed'], function(){
        return View::make('hello');

now that what fails so I now tried

Route::get('myy',['before' => 'sbuscribed', 'uses'=> 'HomeController@showWelcome']);

where i route to controller it it works

Last updated 1 year ago.

Sign in to participate in this thread!


Your banner here too?

apps4u apps4u Joined 7 Apr 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.