我对拉勒维尔很陌生。我创建了新的Controller
class ContactController extends Controller {
public function index(){
die("X");
}
}在我写的routes.php里
Route::get('contact', 'ContactController@index');我认为点击下面的url "X“必须打印。但上面写着“找不到”错误。
http://localhost/lapp/public/contact/index我错过了什么?请引导我。
发布于 2015-05-09 18:33:06
如果apache module_rewrite未被激活。启动它。这肯定会奏效的。
发布于 2015-05-09 16:57:22
你猜得对。但问题是你的URL。应该是http://localhost/lapp/public/contact
或者,您可以使用php artisan serve命令启动服务器,该服务器将在类似于http://localhost:8080的情况下启动服务器,然后可以访问URL,如:http://localhost:8080/contact
https://stackoverflow.com/questions/30142589
复制相似问题