[Laravel]配置路由小记
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]配置路由小记的更多相关文章
- laravel 配置路由 api和web定义的路由的区别详解
1.路由经过中间件方面不同 打开kerenl.php就可以看到区别 protected $middlewareGroups = [ 'web' => [ \App\Http\Middleware ...
- laravel配置路由除了 / 都是404解决办法
1.php.ini开启phpopenssl 2.conf (nginx为例) location / { index index.html index.htm index.php l.php; #tr ...
- laravel配置路由出现404
nginx配置上加一句话 location / { #try_files $uri $uri/ =; try_files $uri $uri/ /index.php?$query_string; }
- 学习laravel之路由问题 404
今天配置路由的时候,只有原来的自带路由可用: Route::get('/', function(){ return View::make('hello');}); 再网上搜索了办法:来自:htt ...
- laravel的路由设置,路由参数和路由命名(三)
laravel中必须先配置路由,才能使用.不像tp中不配置也能使用,因为tp可以通过pathinfo进行自动解析. 一.简单的路由设置 我们一般在routes/web.php文件中配置网页端路由. / ...
- laravel前后台路由分离
在laravel中创建文件放置前台和后台控制器 找到app/providers/RouteServiceProvider.PHP文件 在内配置 例: <?php namespace App\Pr ...
- [PHP] - Laravel - Route路由
前言 这里使用的是Laravel 5 PHP Laravel的路由比较强悍,但也正因如此,不统一而容易凌乱.比如在路由中可以直接写方法操作(破坏封装啊) 以下是个人学习的例子,不供参考 路由中的直接方 ...
- [SignalR]配置路由
原文:[SignalR]配置路由 注册路由,在代码如下(SignalR 1.*): 脚本修改如下: 但是其官方文档解释是: By default, the route URL which client ...
- 如何做到 Laravel 配置可以网站后台配置【社交系统ThinkSNS+研发日记四】
距离上一次分享差不多一周了,本文分享下利用 Laravel 的 Bootstrapping 达到网站后台设置 laravel 配置. 需求场景 首先,ThinkSNS+ 作为一个用户可以使用的「社交系 ...
随机推荐
- codeforce 606B Testing Robots
题意:给定一个x*y的矩形,和一个机器人的初始位置(x0,y0).以向下为x轴正方向,向右为y轴正方向.现在要对这个机器人进行多次测试.每次测 试,会在矩形的某个位置有一个矿井.所以一共要进行x*y次 ...
- javascript活动对象的理解——伪单例模式
在自己研究javascript各种设计模式的过程中,偶然写出的一段代码让自己理解的更深刻了,之所以称之为伪单例模式,是因为这段代码造成的结果很想单例模式,但是实际上是活动对象捣乱所造成的误会. 代码很 ...
- EntityFramework更新多条数据【8万】
此文主要用做记录用: 原因:数据库迁移,需要转换大量用户资料,两数据某字段加密方式不一致需要批量转换 注:转换程序用了EntityFramework 过程: 1.读取所有需要转换数据至List 2.采 ...
- Java流操作之转换流
流的操作规律: 1.明确流和目的. 数据源(源头):就是需要读取,可以使用两个体系:InputStream.Reader 数据汇(目的地):就是需要写入,可以使用两个体系:OutputStream.W ...
- Android实例-操作sqlite数据库之Grid显示图片(XE8+小米2)
结果: 1.数据库文件,记得打包到程序中(assets\internal\). 操作方法: 1.新建firemonkey mobile application①菜单->File->New- ...
- 笔记-iOS 视图控制器转场详解(上)
这是一篇长文,详细讲解了视图控制器转场的方方面面,配有详细的示意图和代码,为了使得文章在微信公众号中易于阅读,seedante 辛苦将大量长篇代码用截图的方式呈现,另外作者也在 Github 上附上了 ...
- UI进阶 数据请求
一.HTTP和HTTPS协议 URL URL全称是Uniform Resource Locator(统一资源定位符)通过1个URL,能找到互联网上唯一的1个资源,也被称为网址,因特网上标准的资源网址 ...
- eclipse jetty启动内存溢出
一.eclipse jetty启动内存溢出, 异常信息 Exception in thread "ConfigClientWorker-Default" java.lang.Out ...
- Android 调用系统的分享[完美实现同一时候分享图片和文字]
android 系统的分享功能 private void share(String content, Uri uri){ Intent shareIntent = new Intent(Intent. ...
- Nginx开发从入门到精通
nginx由于出色的性能,在世界范围内受到了越来越多人的关注,在淘宝内部它更是被广泛的使用,众多的开发以及运维同学都迫切的想要了解nginx模块 的开发以及它的内部原理,但是国内却没有一本关于这方面的 ...