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. VIP网络水军账号

    作为一个技术部的组长,主管公司用户相关的项目.今天一名营销同事找我说他想长生3000个水军账号,我首先就想到了以下几个问题: 1.如何实现 2.产生水军对运营项目的影响,主要问题就是一个真实性问题. ...

  2. 检测是否安装了 .NET Framework 3.5

    此脚本是为 Internet Explorer 设计的.    其他浏览器可能在 UserAgent 字符串中不包含 .NET CLR 信息. <HTML> <HEAD> &l ...

  3. Codeforces Round #225 (Div. 2)

    比赛时候只做出AB,E题一眼看过去似乎线段树能搞,但是写完过不了样例,才发现看错题了,然后比赛就没啥时间了~~整体状况还是很糟糕,A,B题实在出得太慢,然后持续到现在还没出过C题...不能更弱%> ...

  4. android sqlite 中存储 long 数据

    在資料庫的技術中,一個資料庫(Database)表示應用程式儲存與管理資料的單位,應用程式可能需要儲存很多不同的資料,例如一個購物網站的資 料庫,就需要儲存與管理會員.商品和訂單資料.每一種在資料庫中 ...

  5. HDU 4497 GCD and LCM (数论)

    题意:三个数x, y, z. 给出最大公倍数g和最小公约数l.求满足条件的x,y,z有多少组. 题解:设n=g/l n=p1^n1*p2^n2...pn^nk (分解质因数 那么x = p1^x1 * ...

  6. Java之DataInputStream和DataOutputStream-用流操作基本数据类型

    package FileDemo; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.Fi ...

  7. Codeforces Wilbur and Array

    Description Wilbur the pig is tinkering with arrays again. He has the array a1, a2, ..., an initiall ...

  8. Sublime Text2 中Emmet(之前叫Zencoding)插件安装以及使用

    一.添加插件之前先 下载Package Control 按 Ctrl+`(就是~这个键) 复制下面的代码 确认 重新启动sublime text2 import urllib2,os;pf='Pack ...

  9. ASP.NET奇葩说

    1.form表单 在asp.net中(即runat="server"特性时)method默认值为post  在html中默认是get. 2.Web应用程序项目和网站项目:前者后台文 ...

  10. IDF实验室-简单编程-字符统计 writeup

    题目地址:http://ctf.idf.cn/index.php?g=game&m=article&a=index&id=37 网站:http://ctf.idf.cn/gam ...