官术网_书友最值得收藏!

Creating controllers

Now it is time to use the artisan to generate our controller, let's see how we can do that:

  1. Go back to the Terminal window, and type the following command:
php artisan make:controller BandController 

After the command, you should see a message in green, stating: Controller created successfully.

  1. Now, inside app/Http/Controllers, you will see BandController.php, with the following content:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class BandController extends Controller
{
//
}
As a good practice, always create your controller with the suffix <Somename>Controller.
主站蜘蛛池模板: 阿巴嘎旗| 延吉市| 禹城市| 宁阳县| 银川市| 高安市| 页游| 海南省| 四子王旗| 康乐县| 定远县| 都江堰市| 达拉特旗| 新竹市| 十堰市| 泾川县| 彩票| 泗洪县| 海南省| 罗定市| 渝北区| 永清县| 卓资县| 天柱县| 同德县| 疏勒县| 潞城市| 宜兴市| 佳木斯市| 栖霞市| 监利县| 东港市| 中卫市| 铜梁县| 许昌市| 定远县| 澄江县| 西林县| 昌宁县| 湖州市| 马公市|