-
Notifications
You must be signed in to change notification settings - Fork 12
Adding a new controller
Savage edited this page Jan 30, 2017
·
4 revisions
Inside your project folder, run:
$ php forge make:controller ExampleController
To create a controller inside of a sub-directory within the controller directory, you can specify the location:
Inside your project folder, run:
$ php forge make:controller Path\To\Directory\ExampleController
This will create the folder and update the namespace.
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
class ExampleController extends Controller
{
//
}