1 | <?php |
||
3 | class HomeController extends BaseController |
||
|
|||
4 | { |
||
5 | /* |
||
6 | |-------------------------------------------------------------------------- |
||
7 | | Default Home Controller |
||
8 | |-------------------------------------------------------------------------- |
||
9 | | |
||
10 | | You may wish to use controllers instead of, or in addition to, Closure |
||
11 | | based routes. That's great! Here is an example controller method to |
||
12 | | get you started. To route to this controller, just add the route: |
||
13 | | |
||
14 | | Route::get('/', 'HomeController@showWelcome'); |
||
15 | | |
||
16 | */ |
||
17 | |||
18 | public function showWelcome() |
||
19 | { |
||
20 | return View::make('hello'); |
||
21 | } |
||
22 | } |
||
23 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.