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

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

WBOY
Release: 2016-06-06 20:35:16
Original
1628 people have browsed it

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');

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template