【发布时间】:2020-12-03 22:31:57
【问题描述】:
有没有办法在我的路线中使用 slug,例如 domain/technicalInformation,它将是 domain/technical-information。谢谢!
PagesController.php
class PagesController extends Controller
{
public function technicalInformation(){
return view('pages.technical-information');
}
}
web.php
Route::get('/technicalInformation','ConsumerController@technicalInformation')->name('technical-information');
【问题讨论】:
-
您可能需要向我们展示更多代码,
technical-information来自您的数据库吗? -
不,
technicalInformation是我的控制器中使用的功能。我读了一些关于蛞蝓的文档,它使用数据库吗?我现在不使用蛞蝓