03.12.2015 Views

laravel4cookbook

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Access Control List 52<br />

1 Route::any("/group/edit", [<br />

2 "as" => "group/edit",<br />

3 "uses" => "GroupController@editAction"<br />

4 ]);<br />

.<br />

This was extracted from app/routes.php.<br />

Deleting Groups<br />

There are a number of options we can explore when creating the delete interface, but we’ll go with<br />

the quickest which is just to present a link on the listing page.<br />

1 @extends("layout")<br />

2 @section("content")<br />

3 @if (count($groups))<br />

4 <br />

5 <br />

6 name<br />

7 &nbsp;<br />

8 <br />

9 @foreach ($groups as $group)<br />

10 <br />

11 {{ $group->name }}<br />

12 <br />

13 edit<br />

15 \<br />

17 delete<br />

18 <br />

19 <br />

20 @endforeach<br />

21 <br />

22 @else<br />

23 There are no groups.<br />

24 @endif<br />

25 add group<br />

26 @stop

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!