【问题标题】:routing in laravel with xampp使用 xampp 在 laravel 中路由
【发布时间】:2016-05-10 21:09:22
【问题描述】:

我已经开始学习 laravel,(我是个初学者)。在我阅读身份验证教程时,我遇到了以下我不理解的行为。

我可以使用 Url 访问我项目的所有部分

localhost/myproject/public/laravel_route (我正在使用 XAMPP)

当我在localhost/myproject/public/auth/register 提交表单时

使用target = 'auth/register'method='post' 它往往会去

localhost/myproject/public/auth/auth/register

请解释

【问题讨论】:

  • 尝试在目标中添加反斜杠,像这样... /auth/register
  • 谢谢Qazi,我已经试过了,它带我去localhost/auth/register
  • 欢迎您,尝试阅读和理解路线及其用法。 laravel.com/docs/5.1/routing

标签: php laravel xampp


【解决方案1】:

在刀片文件中使用url()函数

<form action={{url('auth/register')}} method ='post'>

【讨论】:

    猜你喜欢
    • 2018-08-02
    • 2021-08-09
    • 2021-06-01
    • 2015-07-17
    • 2018-03-25
    • 2019-02-19
    • 2019-05-07
    • 2014-11-15
    • 1970-01-01
    相关资源
    最近更新 更多