如何在laravel中将Url路径从文件路径名更改为其他名称
在路线代码下方如何在laravel中将Url路径从文件路径名更改为其他名称,laravel,laravel-5,laravel-4,laravel-5.2,laravel-5.3,Laravel,Laravel 5,Laravel 4,Laravel 5.2,Laravel 5.3,在路线代码下方 Route::get('clientlayout.main.index','InvoiceTicketController@show'); Route::get('clientlayout.main.mydomains','InvoiceTicketController@set'); 当我运行这些路由时,我得到的url是 及 . 我希望我的Url更改如下:和 请为我提供一个更改路线的解决方案,以纠正此问题 Route::get('/index','InvoiceTicketC
Route::get('clientlayout.main.index','InvoiceTicketController@show');
Route::get('clientlayout.main.mydomains','InvoiceTicketController@set');
当我运行这些路由时,我得到的url是
及
.
我希望我的Url更改如下:和
请为我提供一个更改路线的解决方案,以纠正此问题
Route::get('/index','InvoiceTicketController@show');
Route::get('/mydomains','InvoiceTicketController@set');
对于命名路由,可以这样使用
Route::get('/index','InvoiceTicketController@show')->name('clientlayout.main.index');
更多详情请参见
对于命名路由,可以这样使用
Route::get('/index','InvoiceTicketController@show')->name('clientlayout.main.index');
更多详情请参见
你应该试试这条路线。
Route::get('/clientlayout/main/index','InvoiceTicketController@show');
Route::get('/clientlayout/main/mydomains','InvoiceTicketController@set');
Url正在生成
或者你应该试试
Route::get('/index','InvoiceTicketController@show');
Route::get('/mydomains','InvoiceTicketController@set');
然后Url正在生成
你应该试试这条路线。
Route::get('/clientlayout/main/index','InvoiceTicketController@show');
Route::get('/clientlayout/main/mydomains','InvoiceTicketController@set');
Url正在生成
或者你应该试试
Route::get('/index','InvoiceTicketController@show');
Route::get('/mydomains','InvoiceTicketController@set');
然后Url正在生成
使用Route::get('/index','InvoiceTicketController@show');代码>和路由::get('/mydomains','InvoiceTicketController@set');代码>而不是路由使用路由::get('/index','InvoiceTicketController@show');代码>和路由::get('/mydomains','InvoiceTicketController@set');代码>而不是您的路线