Assets not loading in localhost for a laravel app - laravel

I have an application which has developed on laravel 5.7 and it's index.php is moved to root directory. Now when i tried to make the server up using php artisan serve command.
The website was loading but assets files like css and js not loading. Entire console showing errors and when i tried to see the asset file code through http://localhost:8000/assets/js/app.min.js
It was showing Error 404
The page you are looking for does't exist.
Can any one help me i am trying to resolve from past two days
Entire app is loading only view is not proper due to non loading of asset files

Related

Updated Image file but not reflecting on Live server in laravel 9

I'm new with Laravel and I made web application but when I updated the image file or some css code it will not reflecting on live server.
I tried:
Route::get('/check',function(){ Artisan::call('cache:clear'); Artisan::call('optimize:clear'); Cache::flush(); });
but this is not working.
I just want to reflecting updated image file or css file when I update it.
"it will not reflecting on live server"
This is the bit that worries me being you've tried the cache clear commands. Laravel will mostly serve up the current assets, there are of course exceptions!
Laravel octane; If you're using this package then php artisan octane:reload
Other sources for these sorts of errors to check first would be
Browser cache - try renaming the files or adding a query string to their lings.
CDN cache - lots of people use cloudflare as a CDN and DNS, make sure development mode is turned on and you've flushed the cache there.
For the most part, just adding a query string and/or changing the name should be enough to prompt a fresh download.

Have a 500 error on live hosting using Laravel App

Can you help me to fix this issue?
I uploaded all files to hosting with all requirements needed (PHP 7.4) and now I see 500 error page. All scripts are working in the public_html directory, but Laravel doesn't.
The configuration is here: http://fratelli.md/info.php

What is the most direct way to push a site update to Laravel?

I've SSH into the server and into the Laravel folder. I updated one of the html footer files but the changes aren't reflected on the website. I feel like I probably need to recompile something.
I tried deleting and re-creating the .env file (I backed it up first).
I've tried running the following commands:
php artisan clear-compiled
php artisan optimize
php artisan cache:clear
The only way I can seem to update the site is by updating the main.min.js file, located at /laravel/public/assets/js/main.min.js which is a terrible way to update the site.
How do I force Laravel to recreate this file or recompile the site based on changes I made to html template files within the site?
What am I missing here? I don't have any Laravel experience and am trying to update this site for a client.
edit:
I think I need to clarify a bit more...
The site appears to be rendered from this file: /public/assets/js/main.min.js
Most of the site's homepage, for example, is located in this js file. But the file is minified and therefore unwieldy to edit directly.
I am assuming (and I could be completely wrong here) that the file is generated from the html files located in the Laravel folder. To support this notion, I have found html files in other directories that correspond to the html located in the main.min.js file.
My assumption is that the previous developer would update the html files and then run something to compile the site into javascript files. But maybe this has nothing to do with Laravel, per se, and more to do with some frontend framework?
Try clearing the cached views...
php artisan view:clear
Laravel assets reside in
resources/assets/js
of your root directory you can have look their
if your file main.js is build using laravel mix have a on webpack.mix.js which compiles all your files you can get idea from that. make sure to run
npm run prod
if you change any file
Hope this helps?

laravel css & js files are not getting loaded

I am using laravel 5.4 and trying to load the CSS & JS files but its not getting loaded when I am running the application. Please let me know what I am doing wrong
The HTML facade is likely trying to load from your applications public/ directory. You should move your admin/ directory into public/.

laravel returning blank screen in production environment

I built a laravel application and uploaded via FTP
Its showing blank in cPanel hosting
I moved the laravel files to another folder and moved all "public" files to public_html folder
I made the app/storage flder writable.
After everything, it shows blank screen
I remember encountering this White Screen Of Death in one of my first attempts at Laravel. It was a permission issue. To avoid duplicate threads, here's a link outlining the issue and solution: Laravel Migration Showing Blank Page, No Debug Screen
Did you debugged if you get any output, for example try adding this to your routes.php file:
Route::get('/', function() {
dd('hi');
});
For Lavarel 4.2, this could also help:
php artisan optimize

Resources