skip to Main Content

I have problem when I’m trying to access home routes on website, but it seems that it doesn’t pass form index.php

dir of require and $app are work because when I dd(1); after it, it show result in website

require __DIR__.'/system/vendor/autoload.php';

$app = require_once __DIR__.'/system/bootstrap/app.php';

dd(1);

but , the problem when handling the incoming request in kernel , which means run application in same file (index.php)

enter image description here
the error after sending response

The GET method is not supported for this route. Supported methods: HEAD.

2

Answers


  1. Chosen as BEST ANSWER

    Found solution ,

    I should use base URL as "/" not "/FolderProject"

      pathInfo: "/"
      requestUri: "/"
      baseUrl: ""
      basePath: ""
    

  2. You should not mess with those files. Seems that you havent defined the document root from the application.

    Make sure that the document root is set to the folder public/ inside the project folder.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search