I have a laravel project first I dont know why I cant unzip the file after uploading it , I unziped it locally than started uploading it after it finishes I dont know where can I find the CLI so I can run composer install, npm install , and the most important running the website using php artisan serve ?
Other Information
(other information and details relevant to your question)
For development on your own computer, you do, yes. But you’re not running in development on your own computer when deploying your site.
Web hosting comes with it’s own PHP runtime environment, you do not need to (and cannot) start your own server process to serve your website.
If you ever get in a situation where you do, please understand that artisan serve is a development server, and should under no circumstances be run on a live server.
The main issue is that artisan serve is a single threaded process, so only one request can be handled at any single time, giving you unusable throughput on a real site. Performance and security is also not a design goal of the dev server, so serving static files (like CSS, JS, images) is also rather slow.
what about the unzipping files problem ? is is a commune thing in free hosting ? cause Im trying to upload the files using file zilla and the connection to the hosting cuts each 10 to 20 seconds I dont know why (my connection to the internet is stable) beside it takes hours just for 100 mo folder
npm run dev with php artisan serve must keep running in the development in order to make the app running , Im not using any js framework just blade with laravel , I dont know how this will effect the code when I upload it
It works on local environments and other hosting platforms (such as premium hosting), but it doesn’t work on free hosting, which is what the original poster is asking about.
But you’re not running development. Both of those are designed to be able to make changes to the code and immediately see the changes. Which is useful in development, but comes with some drawbacks that are disastrous in production.
In production, the production servers provide a PHP environment to replace artisan serve, and for the NPM stuff you just run npm build once to compile the code, and just serve those as static files.