Okay so I want to access the cached file of routes in Laravel version 5.8 I know that there is somewhere Laravel saves this file but I am not sure where to look for it.
I already tried to check the these folders
Storage
Bootstrap
But I couldn't find the route cache file. All I find is cached views and cached services and packages but there is no cache file.
Really Thank you for your time :)
It's in bootstrap/cache/routes.php.
The command php artisan route:cache or php artisan optimize (re)creates this file.
The command php artisan route:clear deletes this file.
Related
I am working in laravel 5 an existing project downloaded from cpanel. I want to make some changes but my changes do not have any affect. I, at the end remove the route but route still working. There is no any extra route file binding in routeServiceProvider not required or included in web.php. I am wondering how it could be happened?
I have tried:
php aritsan cache:clear
php artisan config:clear
can somebody please tell me what could be the issue ?
please run the following:
php artisan route:cache
After running this command, your cached routes file will be loaded on every request.
Please, run the following command:
php artisan route:clear
I have a file in my resources/lang folder and when I made a change to it, it didn't show up on my site.
I've tried php artisan cache:clear, php artisan config:clear, php artisan view:clear, but still no change
Try to clear views folder in Project/storage/framework. It might be an issue.
Have you tried your site on another browser ?
I tried to install Vanilo E-Commerce onto my existing application which clashed with a lot of my migrations thus I want to now remove it.
I tried to run
composer remove vanilo/framework
Which removed everything but then gives me the error:
Class 'Konekt\AppShell\Providers\ModuleServiceProvider' not found
Whenever I attempt to do anything. I believe this comes from when you do:
php artisan vendor:publish --provider="Konekt\Concord\ConcordServiceProvider" --tag=config
How can I remove this provider? I cannot find it in my config/app.php or anywhere else.
You have to delete config/concord.php since that is where Konekt\AppShell\Providers\ModuleServiceProvider is referenced
Try to clear config cache:
php artisan config:cache (clears and caches it again, you can also use clear if I remember it correctly)
You can also try to clear the application cache:
php artisan cache:clear
I am trying to make a middleware using artisan php artisan make:middleware AuthorizedUserOnly but I get ErrorException like below.
file_get_contents(/mysite.com/www/local/composer.json) Failed to open stream no such file or directory.
This is my document root.
-local
-Laravel application folders
-artisan
-index.php
-composer.json
.htaccess
I changed my directory structure to work with shared hosting. And It was working fine.
KEY NOTES
Other artisan commands work. Like I tried php artisan route:list & php artisan config:cache & php artisan tinker.
This directory structure works fine.But as the error says that it is trying to find composer.json in local directory while it is on document root.
php artisan make:model command spits the same Exception
What could be the possible issue and solution ?
Solution : I moved my composer.json file to local directory and it worked fine. So new directory structure is
-local
-Laravel Application Folders
-composer.json
-artisan
-index.php
.htaccess
HOW ?
I am not sure about this yet. But this is the possible reason. php artisan make command create some files. So to included these created files into system execute composer dump-autoload. So to run composer it looks for in the same directory where artisan lives which is local directory in my case.
IMPORTANT
I changed laravel default directory structure to successfully run my applicaiton on SHARED HOSTING which laravel DOESNOT RECOMMEND.
We should follow the recommendations made by laravel to avoid any similiar issue. Specially never to mess with default directory structure at least.
hi there is problem with me I had made complete admin panel using laravel backpack. after uploading on domain its creating the problem when adding deleting or editing operation performs. Error is token mismatching in backpack crud system. please tell the problem with my project
I think you have issue with storage folder permission check this out Laravel Installation Docs
Directory Permissions
After installing Laravel, you may need to configure some permissions.
Directories within the storage and the bootstrap/cache directories
should be writable by your web server or Laravel will not run. If you
are using the Homestead virtual machine, these permissions should
already be set.
Another possible issue is that your variables in .env are not correct
APP_URL=http://localhost //Change this to your url
APP_ENV=local //Change this to production
After you check these things you can do this
Delete all files in app/storage/ files : cache/, sessions/, and views/
Or you can do it by using this commands if you have SSH access to the server
php artisan cache:clear
php artisan view:clear
php artisan route:clear