Laravel:4.2

使用的后台是:laravel-backend

php artisan routes

使用这个代码,可以看到显示目前项目的路由器

,我需要添加功能,我就需要添加路由

/*
|--------------------------------------------------------------------------
| Admin Customer Cpanel Routes
|--------------------------------------------------------------------------
*/
// Route::model('customers', 'Customer');
Route::group(array('prefix' => 'admin', 'before' => 'auth.backend'), function ()
{ Route::group(array('prefix' => 'customers'), function()
{
Route::get('', array('as'=>'admin.customers.index','uses'=>'ACustomerController@index'));
Route::post('', array('as'=>'admin.customers.index','uses'=>'ACustomerController@index'));
Route::get('create', array('as'=>'admin.customers.create','uses'=>'ACustomerController@create'));
Route::get('edit', array('as'=>'admin.customers.edit','uses'=>'ACustomerController@edit'));
Route::get('{$customers}', array('as'=>'admin.customers.show','uses'=>'ACustomerController@show'));
Route::delete('{$customers}', array('as'=>'admin.customers.destroy','uses'=>'ACustomerController@destroy'));
}); //Route::resource('customers', 'ACustomerController');
//Route::get('/customers/index', 'ACustomerController@index');
// Route::get('customers/create', 'ACustomerController@create');
// Route::post('customers/store', 'ACustomerController@store');
// Route::get('customers/edit', 'ACustomerController@edit');
// Route::post('customers/update', 'ACustomerController@update');
// Route::delete('customers/destroy', 'ACustomerController@destroy');
//Route::resource('regions', 'ARegionController');
});

这是我目前定义的路由,可以正常使用了,哎,老板又开始问进度了,暂时放下Laravel,现在要开始用TP做后台了~~~

嘿嘿,我也只不过是依葫芦画瓢而已~~

参考:Laravel 學習筆記(11) - Route 進階

[Laravel]配置路由小记的更多相关文章

  1. laravel 配置路由 api和web定义的路由的区别详解

    1.路由经过中间件方面不同 打开kerenl.php就可以看到区别 protected $middlewareGroups = [ 'web' => [ \App\Http\Middleware ...

  2. laravel配置路由除了 / 都是404解决办法

    1.php.ini开启phpopenssl 2.conf  (nginx为例) location / { index index.html index.htm index.php l.php; #tr ...

  3. laravel配置路由出现404

    nginx配置上加一句话 location / { #try_files $uri $uri/ =; try_files $uri $uri/ /index.php?$query_string; }

  4. 学习laravel之路由问题 404

    今天配置路由的时候,只有原来的自带路由可用: Route::get('/', function(){    return View::make('hello');}); 再网上搜索了办法:来自:htt ...

  5. laravel的路由设置,路由参数和路由命名(三)

    laravel中必须先配置路由,才能使用.不像tp中不配置也能使用,因为tp可以通过pathinfo进行自动解析. 一.简单的路由设置 我们一般在routes/web.php文件中配置网页端路由. / ...

  6. laravel前后台路由分离

    在laravel中创建文件放置前台和后台控制器 找到app/providers/RouteServiceProvider.PHP文件 在内配置 例: <?php namespace App\Pr ...

  7. [PHP] - Laravel - Route路由

    前言 这里使用的是Laravel 5 PHP Laravel的路由比较强悍,但也正因如此,不统一而容易凌乱.比如在路由中可以直接写方法操作(破坏封装啊) 以下是个人学习的例子,不供参考 路由中的直接方 ...

  8. [SignalR]配置路由

    原文:[SignalR]配置路由 注册路由,在代码如下(SignalR 1.*): 脚本修改如下: 但是其官方文档解释是: By default, the route URL which client ...

  9. 如何做到 Laravel 配置可以网站后台配置【社交系统ThinkSNS+研发日记四】

    距离上一次分享差不多一周了,本文分享下利用 Laravel 的 Bootstrapping 达到网站后台设置 laravel 配置. 需求场景 首先,ThinkSNS+ 作为一个用户可以使用的「社交系 ...

随机推荐

  1. Her and his blog

    Tonight, I read localhost8080 and some of her husband m67's blog. I found they are so geek and reall ...

  2. Redhat Enterprise Linux 6.4图形界面的中文问题

    一.界面中文,但Windows中的中文文件名上传到linux后乱码. .bashrc文件: export LANG=zh_CN.UTF-8 /etc/sysconfig/i18n文件: LANG=&q ...

  3. 【转载】chmod u+s

    转自:http://blog.chinaunix.net/uid-26642180-id-3378119.html Set uid, gid,sticky bit的三个权限的详细说明 一个文件都有一个 ...

  4. 【poj2478】Farey Sequence

    题意: 求前n项的欧拉函数之和 题解: 预处理出所有欧拉函数 赤裸裸的模版题- - 没什么好说的 代码: #include <cstdio> typedef long long ll; ; ...

  5. EventBus使用小记

    自从使用了EventBus,代码干净了好多. 从此你不用startActivityForResult了,从此你不用再写注册BroadcastReceiver了,从此你不用再写一些回调了. 只需要在需要 ...

  6. TcxVerticalGrid demo

    procedure TForm1.Button1Click(Sender: TObject);var row: TcxEditorRow; i,t: Integer;begin grid.ClearR ...

  7. 如何计算ModBus超时时间?

    波特率:每秒钟通过信道传输的信息量称为位传输速率,也就是每秒钟传送的二进制位数,简称比特率.比特率表示有效数据的传输速率,用b/s .bit/s.比特/秒,读作:比特每秒. 如9600b/s:指总线上 ...

  8. 325. Maximum Size Subarray Sum Equals k

    最后更新 二刷 木有头绪啊.. 看答案明白了. 用的是two sum的思路. 比如最终找到一个区间,[i,j]满足sum = k,这个去见可以看做是 [0,j]的sum 减去 [0,i]的Sum. 维 ...

  9. MVC4网站发布到windows server 2003服务器

    在windows server 2003上部署MVC4的网站,需要进行以下工作 用VS2013新建项目 在创建项目的时候选择的矿建为.NET Framework4,然后选择[ASP.NET MVC4 ...

  10. SQLyog MySQL GUI 11.13 Ultimate 中文破解版【转载】

    SQLyog是一个易于使用的.快速而简洁的图形化管理MYSQL数据库的工具,它能够在任何地点有效地管理你的数据库! SQLyog MySQL GUI是我常用的一个桌面工具,功能强大,让你有使用MSSQ ...