[Laravel]配置路由小记
2023-09-11 14:20:10 时间
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做后台了~~~
嘿嘿,我也只不过是依葫芦画瓢而已~~
相关文章
- Windows Server 2016软路由配置
- [转] 如何写好.babelrc?Babel的presets和plugins配置解析
- 通过route , tracert , traceroute 查看本地路由配置及访问ip或域名时经过的路由信息
- HCIE-Security Day25:DSPN+NHRP+Mgre:实验(四)配置shortcut方式DSPN(OSPF路由协议)
- Nginx -HTTP和反向代理服务器简单配置
- docker pull 配置代理
- stm32中使用cubemx配置freertos的信号量大小
- Flutter移动电商实战 --(39)路由_Fluro的路由配置和静态化
- Vue - route 路由中配置 404 页面
- ElasticSearch第二讲 ES配置环境参数/调优参数讲解
- Linux:配置本地yum源仓库
- 环境变量配置2 安装mysql
- H3C 配置路由器作为FTP服务器端
- 路由原理,静态路由的基本配置
- CAS 5.1.x 的搭建和使用(四)—— 配置使用HTTP协议访问的服务端
- asp.net mvc中配置路由默认值(Area中)
- 【SoC FPGA学习】十一、基于 Linux 应用程序的 HPS 在线配置 FPGA
- 华为ENSP之VLAN间路由——完整配置教程(下)
- 计算机网络实验二 路由器的配置和静态路由
- Vue学习第29天——路由的props配置项的详解与案例(对比组件props配置项)
- CCNA-(思科网络)静态路由配置