Laravel: Upload images and files linked

1

I have the following code: <link rel="stylesheet" href="css/v1.css"> , but the page does not load it. When inspecting element the following error appears:

Astheimageshows,itcomeswiththelink: link , however if I add the public in url: link , it works normal.

This is happening with more than one file and with images as well. I have already been told that I would need to configure hosts and xampp and windows , but I have no idea how to do this and if this is really the solution.

How can I resolve this problem?

    
asked by anonymous 19.10.2017 / 23:48

1 answer

3

Note: change paths according to your installation.

Go to your file hosts in:

C:\Windows\System32\drivers\etc

And add new line:

127.0.0.1 naslojas.dev

Then, go to your file httpd-vhosts.conf in:

C:\xampp\apache\conf\extra

And add:

<VirtualHost *:80>
    ServerName naslojas.dev
    ServerAlias www.naslojas.dev
    DocumentRoot "C:\xampp\htdocs\naslojas\public"
    ErrorLog "logs/dominio1-error.log"
    CustomLog "logs/dominio1-access.log" common
    <Directory "C:\xampp\htdocs\naslojas\public">
        DirectoryIndex index.php index.html index.htm
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

After everything is set up, restart apache.

    
20.10.2017 / 01:23