Laravel Php artisan make migration error - laravel

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.

Related

Laravel package migrations not available after migrate:fresh

I've installed this package following the instructions.
Now if I run migrate:fresh the wink tables are not there. For other packages the tables are created so I'm not sure why this is.
If I run php artisan wink:migrate it does create the tables, but as I often run php artisan migrate:fresh --seed I would like the wink tables to be created on that command and directly seed them with data like I do with other packages.
For some reason, the author of this package creates a custom command for migration and as can see on official documentation of it After each update, make sure you run these commands: php artisan wink:migrate.
You can overcome this by creating a custom Artisan command.
For example make php artisan make:command FreshDatabase and in that class add what you need, i.e. call:
php artisan migrate:fresh --seed
php artisan wink:migrate
How to create a custom command, you can see on the Laravel Documentation. Source: https://laravel.com/docs/7.x/artisan

Laravel - php artisan migrate doesn't work

I'm trying to migrate my auth tables but when i do php artisan migrate nothing happens. It shows no error, nothing.
Before run this command i ran php artisan make:auth and work well.
Thanks
Check if you have migration that were not ran yet. If you have one, run composer dumpauto command to register this migration and then run php artisan migrate again.
You can find all executed migrations in the migrations table.

Error while running again php artisan session:table command in Laravel 5.2

I am beginner to Laravel, when i run the command "php artisan session:table" first time it successfully created the session migration but unfortunately i have deleted this file. Now when running again this command "php artisan session:table"
its getting error.
error
Please tell me where laravel stores that information that session migration is already created.
Regards,
Kamal
Delete CreateSessionsTable migration in this folder
database/migrations
Run
composer dump-autoload
Then you can run
php artisan session:table
again.

Laravel VentureCraft/revisionable error migration table

I have a problem with install VentureCraft/revisionable in Laravel.
When I trying use this command:
php artisan migrate --package=venturecraft/revisionable
Artisan returned error:
[Symfony\Component\Console\Exception\RuntimeException] The "--package"
does not exist.
I using Laravel version 5.2
Simply, you can migrate by:
php artisan migrate --path=vendor/venturecraft/revisionable/src/migrations
The --package syntax was only available in Laravel 4. It seems like this package has old documentation based off that release.
You'll need to go into the vendor/venturecraft/revisionable/migrations folder and copy the migration and insert it in your database/migrations folder.
Then run the command php artisan migrate.

Unable to install Laravel's 5 cashier/stripe packages

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...

Resources