Home >Backend Development >PHP Tutorial >laravel控制器访问,url应该怎么写

laravel控制器访问,url应该怎么写

WBOY
WBOYOriginal
2016-06-06 20:35:161625browse

laravel安装完成之后,访问控制器HomeController,index方法url该怎么写,routes.php中写了Route::get('home','HomeController@index'),项目根目录:http://localhost/lara/public/index.php

回复内容:

laravel安装完成之后,访问控制器HomeController,index方法url该怎么写,routes.php中写了Route::get('home','HomeController@index'),项目根目录:http://localhost/lara/public/index.php

已经写了,那就访问:http://localhost/lara/public/home

Route::get('/', 'HomeController@index');

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn