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.

File-Based CMS 330<br />

23 ->withErrors($validator);<br />

24 }<br />

25<br />

26 $meta = "<br />

27 title = " . Input::get("title") . "<br />

28 description = " . Input::get("description") . "<br />

29 ==<br />

30 ";<br />

31<br />

32 $name = "layouts/" . Input::get("name") . ".blade.php";<br />

33<br />

34 $this->filesystem->put($name, $meta . Input::get("code"));<br />

35<br />

36 return Redirect::route("admin/layout/index");<br />

37 }<br />

38<br />

39 return View::make("admin/layout/edit", compact(<br />

40 "name",<br />

41 "title",<br />

42 "description",<br />

43 "code"<br />

44 ));<br />

45 }<br />

.<br />

This was extracted from app/controllers/LayoutController.php.<br />

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

2 @section("navigation/layout/class")<br />

3 active<br />

4 @stop<br />

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

6 @include("admin/include/layout/navigation")<br />

7 <br />

8 <br />

9 Name<br />

10 <br />

11 {{ $errors->first("name") }}<br />

12 <br />

13

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

Saved successfully!

Ooh no, something went wrong!