KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using Laravel4 framework and I came across this problem. I want to display a custom 404 error depending on requested url. For example: Route::get('site/{something}', function($something){ return View::make('site/error/404'); }); and Route::get('admin/{something}', function($something){ return View::make('admin/error/404'); }); The value of '$something' is not important. Shown example only works with one segment, i.e. 'site/foo' or 'admin/foo' . If someone request 'site/foo/bar' or 'admin/foo/bar' laravel will throw default 404 error. App::missing(function($exception){ return '404: Page Not Found'; }); I tried to find something in Laravel4 documentation but nothing is just right for me. Please help :) Thank you!
Tags (comma-separated)
Save Edits
Cancel