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') }}">链接 链接

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

原文地址:https://www.cnblogs.com/caicaizi/p/6089263.html