laravel telescope nothing to migrate - laravel

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!

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

PHP Artisan Tinker not working with Laravel 5.5.16

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

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

There are no commands defined in the "passport" namespace. When installing API Authentication In laravel

I am getting below error when i run
php artisan passport:install
[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "passport" namespace.
For installing laravel passport make sure you add this line to config/app.php in the providers array (package service providers section):
Laravel\Passport\PassportServiceProvider::class,
Then install the package and migrate the database
composer require laravel/passport
php artisan migrate
php artisan passport:install
Clearing out the cache is generally helpful first step when commands are not working, especially when you update anything in the config folder on .env files.
php artisan config:clear
php artisan config:cache
Config clear removes the configuration cache file. Config cache creates a new configuration cache file with the current settings. Config cache enables faster load times for your apps!
I got solution. After running following two commands every thing work fine.
run php artisan cache:clear
run php artisan config:cach
I was searching for a solution for this and I found simple one that worked for me:
Add these lines to $commands array in app/Console/Kernel.php
\Laravel\Passport\Console\InstallCommand::class,
\Laravel\Passport\Console\KeysCommand::class,
\Laravel\Passport\Console\ClientCommand::class,
Try running composer require laravel/passport "~9.0" before running php artisan passport:install
Just follow these steps:
composer require laravel/passport.
Once the installation finishes, add the following provider in the config/app.php file: Laravel\Passport\PassportServiceProvider::class,
php artisan migrate
php artisan passport:install
Here Is the solution of install Laravel passport with mongodb:
Just replace the Illuminate\Database\Eloquent\Model; with Jenssegers\Mongodb\Eloquent\Model in below files:
..\vendor\laravel\passport\src\Token.php,
..\vendor\laravel\passport\src\AuthCode.php
..\vendor\laravel\passport\src\Client.php
..\vendor\laravel\passport\src\PersonalAccessClient.php
and protected $table= "Table_name" variable with protected $collection="Table_name"

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