Answer the question
In order to leave comments, you need to log in
Is it possible to use Laravel 5.7 without running artisan serve?
Hello!
I'm making a Laravel 5.7 site locally. XAMPP server on windows. The project folder has a public subdirectory with all the plug-ins. For example, the logo is located in c:\xampp\htdocs\site\public\images\logo.png. I start Laravel ( php artisan serve ) and I see this picture on the site 127.0.0.1:8000
In the code, it is displayed through
or even
Everything is ok. Although, if you look at the code, you can see that they are expected in the root of the site, and not in public:
I do not understand this point.<img src="{{asset('images/logo.png')}}">
<img src="/images/{{ $image->image }}"/>
<img src="https://site.ru/images/logo.png">
I copy the site to a hosting (virtual, not VPS) on Windows with IIS (there are no other options), I import the database, I prescribe web.config in the root of the site. I look at the site - the page is rendered without all the connected pictures, scripts and styles. Logically. But how to use the site if there is no way to run php artisan serve on the server? Or does Laravel fundamentally not work without it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question