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

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.
主站蜘蛛池模板: 深州市| 原平市| 长治县| 澄迈县| 精河县| 贡山| 苗栗市| 辛集市| 博客| 张家口市| 昭通市| 英吉沙县| 保亭| 客服| 台中市| 渭南市| 富源县| 宜君县| 吉水县| 左权县| 贡觉县| 南平市| 介休市| 普安县| 旌德县| 石柱| 桃园县| 紫金县| 彰武县| 桐梓县| 惠安县| 阳江市| 阿克陶县| 孝感市| 星座| 淮滨县| 贡觉县| 且末县| 普陀区| 修武县| 西昌市|