Laravel中URL,ACTION,ROUTE区别

创建路由如下所示:

Route::get('articles',['uses'=>'ArticlesController@index','as'=>'articles.index']);

要访问该URL可以通过如下形式:

  • URL方式

<a href=http://blog.csdn.net/easion_zms/article/details/"{{ url('/articles') }}">链接 链接

  • Route方式

<a href=http://blog.csdn.net/easion_zms/article/details/"{{ URL::route('articles.index') }}">链接 链接

  • Action方式

<a href=http://blog.csdn.net/easion_zms/article/details/"{{ URL::action('ArticlesController@index') }}">链接 链接

所以在路由配置中,每个参数的代表意义为:

posted on 2016-11-22 14:42  caigan  阅读(420)  评论(0编辑  收藏  举报