Route Error When Accessing Site

1

When I add this route in the routes.php file:

routes.php

Route::get('postagem', function (){
   return "teste";
});

Route::get('/', function(){
    return View::make('hello');
});

Displays this error:

  

Fatal error: Class 'Route' not found in C: \ wamp \ www \ laravel \ app \ routes.php on line 13

Use Laravel 4.2, Wamp Server. I have done several commands with the composer to update, but without success.

    
asked by anonymous 10.11.2015 / 16:18

1 answer

1

Try to do this:

Create a Controller by the command:

$ php artisan make:controller HomeController .

Then on the route delete everything and do:

Route::controller('/', 'HomeController');

In HomeController put the code:

public function getIndex(){
    return "Teste";
}

Then at the URL type:

  

link

    
10.11.2015 / 19:02