Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. App::missing(function($exception)
  2. {
  3. return Response::view('errors.404', array('error'=>$exception), 404);
  4. });
  5.  
  6. //I know this code doesn't work, I've just wanted to show the claim
  7. App::missing('HomeController@error');
  8. App::error('HomeController@error');
  9. // or ...
  10.  
  11. public function error(Closure $callback)
  12. {
  13. $this['exception']->error($callback);
  14. }
  15.  
  16. App::missing(function($e){
  17. // Use the model here you want
  18. $var = 'SomeValue' from model
  19. return Response::view('errors.404', array('error'=> $e, 'another' => $var));
  20. });
  21.  
  22. App::missing(function($exception)
  23. {
  24. return App::make('HomeController')->error($exception);
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement