I'm new in git.
I'm modifying my Laravel project in my project's git folder.
but when I do php artisan serve, changes not work and previous codes run!
I have found the problem and solved it by :
php artisan route:clear
The routes got cached
Related
I am upload project file to Sub Domain. But In web site,just project files is showing. Project is not execute. How can i resolve this problem ?
Subdomain is active.
Your hosting and configuration should have the ff:
Appropriate PHP version compatible to your Laravel project.
Composer and Laravel installed.
Proper web server configuration for Apache, Nginx, Litespeed, etc. This is most likely where your problem is, where you should only expose the /public folder as the only public directory of your page.
I installed composer and I add .env file the run some commands like
php artisan key:generate
php artisan clear-compiled
php artisan cache:clear
php artisan config:clear
php artisan optimize
php artisan route:cache
Then resolved problem.
My app just displays the html code in the browser. It worked fine. I was actually working on an update when I noticed the view didn't seem to refresh, so I cleared cookies in my browser. That didn't work so I ran php artisan view:clear. It was still not working, so I just wanted to reset and clear all cache and ran php artisan optimize:clear. After attempting to reset and cache everything the view been messed up and all I see is the html in the browser. I have tried what I feel like is every artisan command, php artisan config:clear
php artisan config:clear and cache, php artisan view:clear and cache
php artisan route:clear and cache, php package:discover, livewire:discover, composer dump-autoload, - delete all in bootstrap cache, sudo rm -rf vendor/ , sudo rm composer.lock composer install, npm install, npm run dev, reinstall everything. I even just decided to clone a whole new project from the repo. Composer install, npm install, npm run dev and still the save exact issue. Help is appreciated. The routes still seem to work on the navbar, it is just the views. Thanks!
UPDATE: Another developer cloned the project on their computer and it works fine. Still can't get it to work on mine.
I have also encountered the same issue. It happens because of having an HTML comment at the beginning of the livewire blade component. For example,
<!-- <div> -->
Remove the HTML comment and it will resolve the issue.
Enclose all your livewire components blade code inside a parent div tag. I think it will solbe your issue.
Check this:
enter link description here
I was also having this problem, and realized that the config for manifest_path was pointing to the wrong directory. As you can see, /tmp/storage/bootstrap/cache doesn't exist for a fresh Laravel install on a local machine so it can't ever find it.
The solution is to publish the config with php artisan vendor:publish --tag=livewire:config and then change manifest_path to the appropriate path, mine being \bootstrap\cache\livewire-components.php.
Hope this helps!
I am trying to edit some files (for example change the path of logo file) in resources folder in laravel project. After editing files which needed website is not updated.
I used :
php artisan config:clear
php artisan config:cache
php artisan cache:clear
but nothing helped. changes are not updated. Maybe I need to run some commands from ssh and make edition?
i have a laravel 6 app that i want to install the telescope in that i did all the commands like composer update and composer dump-autoload and then i install the telescope every thing is going fine and when i run php artisan telescope:install i get the message below :
Publishing Telescope Service Provider...
Publishing Telescope Assets...
Publishing Telescope Configuration...
Telescope scaffolding installed successfully.
but it wont generate the config file and migration so when i run php artisan migrate i get this message :
nothing to migrate
in your command
php artisan vendor:publish --tag=telescope-migrations
then edit you your env file
TELESCOPE_ENABLED=true
after this run
php artisan optimize
Finally
php artisan migrate
You must publish it first using the below command:
php artisan vendor:publish --tag=telescope-migrations
Then you will get the default migrations and also the config/telescope.php file
After installing the telescope in my project and exporting the default migration I got this error.
λ php artisan vendor:publish --tag=telescope-migrations
Unable to locate publishable resources.
Publishing complete.
How I solve this issue
If you're getting this issue open telescope.php file which is inside of your config directory.
and then set the value of this TELESCOPE_ENABLED to true
'enabled' => env('TELESCOPE_ENABLED', true),
Because in my case the value of TELESCOPE_ENABLED this was false
Then again run this command php artisan vendor:publish --tag=telescope-migrations.
I hope it will work :)
I had accidentally ran php artisan optimize in my local environment which was causing this issue. To fix it, I had to run php artisan optimize:clear, then uninstall laravel/telescope, remove any references to it, and install it again from scratch. It then recognised the migrations and the published assets.
I did this
composer remove laravel/telescope
Then change your .env file
TELESCOPE_ENABLED=true
Then install back again it worked!
I'm just learning Laravel 5 and I am loving it.
I have an issue though, my php artisan command just stopped working all of a sudden. It shows this error
[RuntimeException]
Directory name must not be empty.
I am running on a windows10 pc . Thanks
Today I got the same issue while working on local environment, I really don't know how but my config folder was deleted automatically. Fortunately, I had backup with me and I simply re-add the config folder into my project and my site is back.
I think you need to update your composer like:
composer update
OR
composer update --no-scripts
after you can clear the cache
php artisan config:cache
php artisan config:clear
php artisan cache:clear