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

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.
主站蜘蛛池模板: 肇州县| 新晃| 龙江县| 阳春市| 开化县| 呼图壁县| 漠河县| 佛坪县| 大洼县| 宾川县| 朝阳区| 顺昌县| 灵山县| 天峻县| 屯门区| 开鲁县| 乌兰浩特市| 成都市| 姚安县| 北辰区| 金山区| 固原市| 丽江市| 清水县| 田东县| 洮南市| 历史| 荃湾区| 永宁县| 星子县| 鄂尔多斯市| 嘉定区| 平罗县| 武夷山市| 亳州市| 澜沧| 绥棱县| 高邑县| 宜春市| 洛扎县| 蚌埠市|