[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 進階
转载于:https://www.cnblogs.com/fsong/p/4942918.html
[Laravel]配置路由小记相关推荐
- php为什么需要配置路由器,laravel 配置路由 api和web定义的路由的区别详解
1.路由经过中间件方面不同 打开kerenl.php就可以看到区别 protected $middlewareGroups = [ 'web' => [ \App\Http\Middleware ...
- laravel配置路由会报404 Not Found
laravel配置路由会报404 Not Found 故障现象: 例如:配置了测试路由,正常访问"域名/user",应该返回"路由测试", Route::get ...
- laravel php配置,PHP Laravel框架路由配置及设置技巧全解
Laravel框架在PHP开发中使用十分广泛,本文主要对Laravel框架中的路由设置作详细的介绍,Laravel的路由配置非常灵活,如何设置好路由对PHP应用来说也是相当关键的. 基本路由 您的应用 ...
- laravel 配置微信公众号时{errcode:-106,errmsg:token check fail}
一.问题描述 做微信授权登录时,遇到的一个坑,提示配置失败,F12,响应为 errcode":-106,"errmsg":"token check fail 二 ...
- laravel配置语言包,实现网站中英文切换
一.laravel语言包的配置,在resources/lang/en,这是默认的语言,自己添加一个zh文件夹,在下面创建需要切换的语言页面,如 zh/header.php <?php retur ...
- Jfinal 2.1版本,JFinalConfig里自动配置路由的代码实现,直接晒代码
2019独角兽企业重金招聘Python工程师标准>>> 背景: 1.我使用的jfinal2.1: 2.我喜欢用@ActionKey("/admin/index") ...
- Windows server 2012 搭建×××图文教程(二)配置路由和远程访问服务
Windows server 2012 搭建×××图文教程(一)安装×××相关服务 Windows server 2012 搭建×××图文教程(二)配置路由和远程访问服务 Windows server ...
- IP地址的划分和配置路由
IP地址:是一种在Internet上的给主机编址的方式,也称为网际协议地址.常见的IP地址,分为IPv4与IPv6两大类: 路由:路由器能把不是同一个网段的网络设备连接起来,使它们能够建立通信: IP ...
- Django之创建应用以及配置路由
Django之创建应用以及配置路由 配置所有IP都可以访问你的项目 1.进入manage.py同级的my_web里面的settings.py的文件 2.在文件的第28行把ALLOWED_HOSTS = ...
最新文章
- mysql innodb_data_file_path_关于innodb_data_file_path设置
- 如果MySQL的自增 ID 用完了,怎么办?
- Windows核心编程 第七章 线程的调度、优先级和亲缘性(下)
- python中的列表生成式
- 调试U-Boot笔记(三)
- vb 获取mysql表第一行数据_vb如何将远程获取的数据插入本机数据表中
- keyvaluepair_KeyValuePair用法(转)
- docker安装hbase
- 开发者请注意!2020年的大前端发展趋势已出炉! | 原力计划
- 前端开发的壁垒在哪儿?
- 深入浅出裸测之道---单元测试的单元化
- python输入数字输出中文_go格式“占位符”, 输入输出,类似python的input
- Weakness and Poorness
- MFC用户界面设计 一
- ppt插入计算机时间,WPS之PPT插入自动更新的时间设置
- Android开发中的Java包的定义
- 物联网共享单车有什么物联技术?
- Centos7+DockerCompose部署.NetCore3.1应用
- pca人脸特征降维的过程理解及matlab编程实现
- 泊松分布和指数分布,包你学会
热门文章
- apache之mod_status mod_info即时监控模块
- ASP.NET ActionPack
- sqlite字符串连接(追加写入)
- [Python] L1-010. 比较大小-PAT团体程序设计天梯赛
- 蓝桥杯 ALGO-73 算法训练 统计字符次数
- L2-008. 最长对称子串-PAT团体程序设计天梯赛GPLT
- 12月第2周业务风控关注 | 公安部:严打自媒体“网络水军”违法犯罪,关闭大V账号1100余个...
- centos6.5 安装php-5.6.31
- ios textView显示不全
- jquery validate 联动验证