Advertisement
Guest User

larav

a guest
Jul 23rd, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. //apps/routes.php
  2.  
  3.     <?php
  4.  
  5.     Route::get('/', function()
  6.     {
  7.         return View::make('home');
  8.     });
  9.  
  10.  
  11.     Route::get('authors', array('uses'=>'authors@index'));
  12.  
  13.  
  14. //app/controllers/authors.php
  15.  
  16.     <?php
  17.  
  18.     class AuthorsController extends BaseController {
  19.  
  20.     public $restful = true;
  21.  
  22.     public function get_index(){
  23.         return View::make('authors.index');
  24.         }
  25.     }
  26.     }
  27.  
  28. //app/views/authors/index.php
  29.  
  30.     <h1>logging me</h1>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement