Linking directly to an individual incident

This commit is contained in:
James Brooks
2015-08-15 15:10:20 +01:00
parent c2c815ab14
commit 8a3f9196d3
7 changed files with 76 additions and 38 deletions

View File

@@ -94,6 +94,7 @@ class StatusPageController extends Controller
*/
public function showIncident(Incident $incident)
{
return View::make('incident')
->withIncident($incident);
}
}

View File

@@ -33,12 +33,12 @@ class StatusPageRoutes
], function ($router) {
$router->get('/', [
'as' => 'status-page',
'uses' => 'HomeController@showIndex',
'uses' => 'StatusPageController@showIndex',
]);
$router->get('incident/{incident}', [
'as' => 'incident',
'uses' => 'HomeController@showIncident',
'uses' => 'StatusPageController@showIncident',
]);
});
}