I am seeing old laravel site even after updating files - laravel

I have a website that uses vuejs as frontend and Laravel API in backend. Recently I updated my Laravel site it was working absolutely fine in my localhost. But the problem is when I upload my Laravel files to my hostinger.com hosting account it's not updating. It's displaying me old site but my database got updated and I was able to errors of the new site.
I tried these none of them seems to be working,
Cleared browser history and cache
Tried reuploading site again
I ran following commands
php artisan config:cache
php artisan route:cache
php artisan view:cache
npm run prod
Tried to use cmd command ipconfig/flushdns
Still, I was not able to solve the issue.

Have you tried refreshing your website with CTRL+F5 or CTRL+R ?

Related

I can not create new Routes in Laravel project

I was developing a Full-Stack Laravel project using livewire and tailwind CSS in the front, everything was working just fine, I even did 5 commits on GitHub on this project. The problem is I came back to continue developing the project, and when I create new routes, Laravel returns 404 PAGE NOT FOUND, I even tried to test a very simple route, and it did not work too(404 page not found)
Route::get('/test', function () {
return 'hi';
});
Any solution to this weird problem?
Might be a chaching problem.
Try clear your cache by running
php artisan cache:clear
php artisan clear
You can also check all registered routes by running
php artisan route:list.
If thats not working it could also be a problem with the browsers internal cache. Had something like this before with Firefox.
Try using curl to access the endpoint
curl http://localhost:8080/test

How to make my Laravel API project with Passport faster?

I'm developing a Laravel API based on larapi project and I think I'm doing something wrong, because every request to my API takes about 3 seconds to return, don't matter the size of the response.
I've searched a lot and already tried to run the following commands, but my requests still slow:
composer dump-autoload -o
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan view:clear
My server and database server are hosted separatedly. I already did some tests with other projects and the servers runs fast. It seems to be a problem with Passport (Laravel OAuth authentication), it try to authenticate the user's access token on every request.
Has anyone faced this problem?
Thanks for your attenion.
Regards.

Laravel Website on local server is showing error (The page has expired due to inactivity. Please refresh and try again. )

My Website is working fine on hosting server, but when I downloaded all files and want to make changes on local server is showing error on submitting the form. All form has CSRF Token
The page has expired due to inactivity. Please refresh and try again.
I have cleared cache, route, and even generate a new key by the following command.
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan view:clear
php artisan generate:key
Run composer update
If still not work navigate to bootstrap - > caches and delete files present in it.
To test if token is passing use network tab in inspect element of browser.

Laravel 5.2 fails to read the session cookie

I have a issue in my laravel applications, i'm using XAMPP test run my applications locally on windows machine.
My problem is that Laravel applications get's logout suddendly, this happens very often, if i refresh the same page like 4 , 5 times it get's logged off. but when i check the chrome dev tools Cookies, Laravel_session is still there.
Any idea as to why this could happen?, also, i don't get the same issue when it's hosted online.
May be the problem is with session driver. Because as you said that if i refresh the same page like 4 , 5 times it get's logged off, by default session storage is file and you 4-5 time request may messing it up. Here I'm not sure but this stuff may solve your issue.
Change SESSION_DRIVER=file to SESSION_DRIVER=database in .env
Create session migration with php artisan session:table artisan
code
Run composer dump-autoload to regenerates the list of all
classes
Run php artisan migrate to migrate.
NOTE: You can run single migration file by separate with subfolder

laravel file is not updating

i have been working on my project for several week. everything was fine. but today all of a sudden i can not load some of my changed views (some i can change and get result). even if i change the controller, its still now working. according to SO and some other site i have tried followings
restart browser
clear browser cache, history(even tried new browser)
php artisan cache:clear
php artisan view:clear
composer dumpautoload
delete all files from storage/framework/views folder
delete all files from storage/framework/sessions folder
restart nginx server
what did i miss. thanks in advance.
Run php artisan view:clear command to clear views cache. If this won't help, delete all php files in storage/framework/views directory.
Another thing you should do is to check if you're calling the view you want. It happens in big projects with a similar views. Use Laravel Debugbar to display actually loaded views.

Resources