I have put the "laravel/cashier": "~5.0" line in my composer.json file, updated it;
Next, I have put the line 'Laravel\Cashier\CashierServiceProvider' into $providers array in, app.php
Then, in cmd when I try to migrate table, php artisan cashier:table builder, i get the message:
[InvalidArgumentException] There are no commands defined in the "cashier" namespace.
Then, when I type: php artisan, there is no cashier:table command, what and where is the problem?
I had same problem and when I run that commands php artisan config:cache and php artisan clear-compiled it worked...
Related
When using Laravel with Jenssegers/MongoDB and Cashier, I receive the error:
Call to a member function prepare() on null.
Browse to laravel/vendor/cashier/src/
Open both subscription.php and subscriptionItem.php and change
use Illuminate\Database\Eloquent\Model;
to
use Jenssegers\Mongodb\Eloquent\Model;
remove the composer.lock and run this command
composer require jenssegers/mongodb
after that run these command as well:
composer dump-autoload
php artisan cache:clear
php artisan view:clear
php artisan config:clear
and restart your server. also, make sure you have installed the latest version of composer.
So, I'm trying to use Intervention Image with the Imagick driver.
I've done php artisan vendor:publish, and selected Intervention, and now config/image.php exists. I've changed 'driver' => 'gd' to 'driver' => 'imagick', but nothing at all happens.
I then tried php artisan config:cache, same thing.
Then composer dump-autoload, then php artisan cache:clear and any other combinations of the above.
I can put literally anything in this file, fill the array with invalid syntax, junk etc, and it's completely ignored.
Is there something I'm missing? I've tried everything I'm aware of.
Please delete cache folder from bootstrap folder and create new empty cache folder in bootstrap folder after run below command
php artisan config:cache
php artisan cache:clear
Please try with:
php artisan config:clear
The config:clear command is used to remove the configuration cache file created by the config:cache command. By default this command will delete the bootstrap/cache/config.php file.
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
what i need is need to create_attendance_table using php artisan make:migration create_attendance_table.
But it gets an error like this in my cmd
How can i fix this error?
Seems like you have first created a create_attendance_table and deleted it. The error came across because it couldn't find that deleted migration file. To get rid of error
First hit command
composer dump-autoload
and then,
php artisan make:migration create_attendance_table
Hope this will help you.
for creating migration file you need this command like
php artisan make:migration create_users_table --create=users
for your table :
php artisan make:migration create_attendance_table --create=attendance
your command will migrate existing file, so that's why that error came.
Please read documentation for further details.
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"