【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
路由写法:
文件路径:aravel\app\Http\routes.php
Route::get('student/urlTest',['as'=>'url','uses'=>'StudentController@urlTest']);
blade视图写法
文件路径:laravel\resources\views\
<!-- url -->
<!-- 原始路径 -->
<a href="{{url('student/urlTest')}}">url()</a><br/>
<!-- 接口路径 -->
<a href="{{action('StudentController@urlTest')}}">action()</a><br/>
<!-- 别名路径 -->
<a href="{{route('url')}}">route()</a><br/>
来源:oschina
链接:https://my.oschina.net/lixiaoting/blog/3154392