When accessing Laravel in browser, the URL contains "index.php" OR "public/index.php". Having these in URL is not a good SEO practice.

To remove "index.php" from URL, you can write a small code snippet in ".htaccess" file located at "public/" directory.

Method #1:

  # Redirect to non-index.php url.
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L]

Method #2:

  # Redirect to non-index.php url.
  RewriteCond %{THE_REQUEST} ^.*/index\.php
  RewriteRule ^index.php(.*)$ /$1 [R=301,L]

NOTE*: If above changes are not reflecting, make sure your Apache Virtual Host entry has AllowOverride set to All.

  AllowOverride All

Reference: