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',
]);
});
}

View File

@@ -33,8 +33,8 @@ class ComposerServiceProvider extends ServiceProvider
$factory->composer('*', AppComposer::class);
$factory->composer('*', CurrentUserComposer::class);
$factory->composer(['index'], MetricsComposer::class);
$factory->composer(['index', 'subscribe'], StatusPageComposer::class);
$factory->composer(['index', 'subscribe'], ThemeComposer::class);
$factory->composer(['index', 'incident', 'subscribe'], StatusPageComposer::class);
$factory->composer(['index', 'incident', 'subscribe'], ThemeComposer::class);
$factory->composer('dashboard.*', DashboardComposer::class);
$factory->composer(['setup', 'dashboard.settings.app-setup'], TimezoneLocaleComposer::class);
}