Creating new routes and nesting child viewsΒΆ
New route with alias and nested child view:
1 2 3 4 5 | Route::get('route_name', array('as' => 'alias_for_route', function()
{
return View::make('view_name')
->nest('alias_for_child', 'child_name');
}));
|
When using this example above we could echo out the child view with {{ $alias_for_child }}.
1 2 3 4 | Route::group(array('https', 'before' => array('auth|admin')), function()
{
// Routes
});
|
This is a group that applies three filters. First one it a standard rule that only allows connections through HTTPS. Second one makes sure the user is logged in, the third that the user role is admin.