Skip to content

Commit

Permalink
Improved Controllers load example
Browse files Browse the repository at this point in the history
  • Loading branch information
eusonlito committed Mar 26, 2015
1 parent 0bda453 commit e737ccf
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,20 @@ Publish the config file:
php artisan vendor:publish
```

#### app/Http/Controllers/homeController.php
#### app/Http/Controllers/Controller.php

```php
<?php namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesCommands;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;

use Meta;

class Home extends Controller {
abstract class Controller extends BaseController {
use DispatchesCommands, ValidatesRequests;

public function __construct()
{
# Default title
Expand All @@ -62,7 +68,17 @@ class Home extends Controller {
# Default robots
Meta::meta('robots', 'index,follow');
}
}
```

#### app/Http/Controllers/HomeController.php

```php
<?php namespace App\Http\Controllers;

use Meta;

class HomeController extends Controller {
public function index()
{
# Section description
Expand Down

0 comments on commit e737ccf

Please sign in to comment.