I'm learning laravel but it isn't working out that well.... I've set my route in routes.php:
Route::get('/','WelcomeController@index');
Then I obviously have made a controller called "WelcomeController" and it looks like this:
<?php
class WelcomeController extends BaseController
{
public function index()
{
return view ('index');
}
}
?>
And then I've made a view called index with just some html text.
But when I go to localhost/public I receive the error:
FatalErrorException in WelcomeController.php line 3:
Class 'BaseController' not found
And when I say:
class WelcomeController extends Illuminate\Routing\Controller
It does not work!
What am I doing wrong.
namespace App\Http\Controllers;
at the top of your file. – lukasgeiterlocalhost/public/index.php/contact
. If that works, you have a htaccess problem... – lukasgeiterAllowOverride All
) I'm sure you'll find something on google if you need more help with that... – lukasgeiter