PHP Artisan Tinker not working with Laravel 5.5.16 - laravel

I run php artisan tinker but it didn't work it just show a message like this
c:\xampp\htdocs\app_tpa>php artisan tinker
[ErrorException]
rmdir(C:\Users\KIMUNG~1\AppData\Local\Temp\php-xdg-runtime-dir-fallback-): Directory not empty
I tried to run composer require laravel/tinker, but it doesn't fix my problem

This issue is now resolved as per these github issues:
laravel/tinker#29
bobthecow/psysh#430
The proper solution now is to do composer update

Related

Php artisan serve in laravel

I am new in laravel development. I am using latest version 9 of laravel, when I write php artisan serve in git bash or in VS code terminal after sometime it gives an error. I attached a screenshot of an error.
run php artisan optimize command
composer install
composer update
php artisan optimize:clear
This will clear all the cache of the application

laravel telescope nothing to migrate

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!

file_put_contents(C:\xampp\htdocs\instant\storage\framework/sessions/FF): failed to open stream: No such file or directory

I was trying to upload this instance on Amazon elasticBeanstalk, but it doesn't seem to work.
I have tried using ssh to access the files to no avail.
i did php artisan config:cache and composer dump-autoload before uploading.
Any help is appreciated.
Go to directory laravel/bootstrap/cache and delete config.php file.
Open terminal in your project directory and run this cmd:
php artisan config:clear
How did I solve this issue? After running those commands and not getting the solution.
composer dump-autoload
composer install
php artisan cache:clear
php artisan config:clear
php artisan optimize
php artisan clear-compiled
The issue was simple. In my case under storage/framework there is sessions folder is missing so I created the directory and run the command again. And issue solved.
**Note: In some cases if your run php artisan cache:clear and php artisan config:clear. Your issue will be solved.
Hope this thread will solve your issue.
Happy Coding :)
Can try using php artisan optimize. This will clear everything that cache your projects.
Let me know if this help you guys. Thanks!
run php artisan vendor:publish
Asking Which provider or tag's files would you like to publish?:
Type 0
Then run php artisan serve
This command work in my case: php artisan config: clear
It worked for me when i changed all paths in C:\xampp\htdocs...\bootstrap\cache\config.php

Laravel 5.4 RuntimeException] Directory name must not be empty

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

RuntimeException in Laravel 5.3

I've just installed Laravel 5.3. php artisan serv also runs.
But as I hit http://localhost:8000/ on browser I get a RuntimeException.
Is there any solution to prevent this error?
Create cipher key by this command
php artisan key:generate
Then run server
php artisan serve
To avoid this problem always use composer for creating project.
Ex. composer create-project laravel/laravel your_project_name --prefer-dist
if you create project by composer then need not to run this command.
php artisan key:generate

Resources