Laravel VentureCraft/revisionable error migration table - laravel

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.

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 make migration error

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.

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.

Laravel 5.1 - artisan make command

in Laravel 4.2 by using JeffreyWay/Laravel-4-Generators we could use
php artisan generate:view my-view
to create a view named my-view.blade.php.
Now in Laravel 5.1 what we should use to generate a view?
php artisan make:???
According to package's developer, you need to use L5 version instead. Now you are able to run php artisan generate:view.
As a reminder, these commands are not native of laravel artisan console.
In laravel 5.1 no artisan command for make/generate view.
You can install sven/artisan-view package to make view from CMD, to install package write this command:
composer require sven/artisan-view --dev
After installing it, you can make a single view or folder with all views that contain {index-create-update-show}
To make a single file we using this command:
php artisan make:view Name_of_view
For example
php artisan make:view index
To make a folder that contain all resources index - create - update - show write name of folder that contain all this files for example:
php artisan make:view Name_of_Folder -r
For example:
php artisan make:view blog -r
-r is a shorthand for --resource you can write full name or shorthand to make resource.
For more view docs

Laravel migration issue

I have an issue with the composer for creating migrations.
I just installed Laravel 4.2 via composer.
But i want to make migrations for my DB via composer, so i typed this command below:
php artisan migrate:make create_user_table
But then i get the error:
(I've tried it again to install Laravel 4.2, but i still get this error.)
Could not open input file: artisan
How can i fix this?

Resources