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

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.
主站蜘蛛池模板: 隆安县| 建始县| 肥城市| 凤城市| 西充县| 错那县| 雷山县| 比如县| 囊谦县| 宽甸| 万全县| 五常市| 三河市| 西和县| 航空| 长白| 灵山县| 象州县| 潮安县| 黄浦区| 怀仁县| 耒阳市| 漳州市| 澎湖县| 鹤壁市| 大荔县| 浙江省| 安平县| 界首市| 黔西县| 安溪县| 广饶县| 湟源县| 阳原县| 洞口县| 新安县| 清涧县| 佛冈县| 银川市| 赣榆县| 龙口市|