Print something inside Try or Catch block...just to make sure where's the error coming
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 :)
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
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community