Laravel在localhost上做得不好

I have a code (who works on remote server), but he don't want work on my VM linux (ubuntu 16).

Issues are varied :

  • CSS isn't read
  • @import and @expand don't work
  • Laravel routes don't work

Apache 2 rewrite_module is ok (classical solve for Laravel routes issue)

PHP 7 is ok (phpinfo is good), Laravel is ok (access to database via Eloquent is good).

I precise that my html code is generate via php artisan with blade.

I suppose that I forgot a step in my configuration but I don't see what...

Edit :

  • Change on Apache's config DocumentRoot from root of application to /public solve the CSS issue.
  • a valid .htaccess is now ok, without change.

So, now, my major issue is to find why https://www.xxxxx.vvv/api/v3/docs works and https://localhost/api/v3/docs doesn't. Given that https//www.xxxxx.vvv/ and http://localhost/ work in the same way.

versions : php 7.0.3 Laravel 5.0.4

(and I don't want update)

As you said, .htaccess file missed. So put it in public directory with the following code:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]