Laravel php artisan make:auth doesn't create migration files - laravel-5

After creating my Laravel 5.2 App I added auth to it but there are no migration files for users and password_resets.

Laravel by default gives two migration files with these file names
1. 2014_10_12_000000_create_users_table " date is always the same "
2. 2014_10_12_100000_create_password_resets_table
Path for migrations is \The_App\database\migrations
Laravel Auth uses these migrations for the authentication process. It doesn't creates new migrations ...

Related

Laravel: Database SQLite does not exists

I created a sqlite using vim and it created database.sqlite.swp. Then i configure the .env DB_Connection to sqlite.
Afterwards, I run php artisan serve and php artisan migrate but i got error :
Database (C:Laravel/Project/database/database.sqlite) does not exist.
Vim v8.2
Laravel v4
Please help me :<
You have to create new file in this path (C:Laravel/Project/database/) and name it database.sqlite

Creating Schema automatically using migration in Laravel

Is it possible to create schemas automatically in the database when xampp is turning on? There is no information about it in the Laravel documentation, documentation says only how to do it manually by writing the command php artisan migrate.
Xampp includes a script called apache_startup.bat in the root directory, you can add the following line to it
c:\xampp\php\php.exe -f /path/to/laravel/app/artisan migrate
Then when the apache server starts, it should run that the equivalent of php artisan migrate to setup the database.
You can do php artisan make:migration [migration-name] - other than that, you have to fill the rest yourself.

Laravel passport migration not found

I installed laravel passport using command compser require laravel/passsport,
but after this, no new migration was made in database/migrations directory.
Why is that?
The migration files exist in the Passport package in your vendor directory.
The migrations won't be copied over to your database/migrations folder as they don't need to be since they're registered by the PassportServiceProvider.
You should just be able to run php artisan migrate and they will be included.
If you're using Laravel 5.3 or 5.4 then you will need to register the service provide in your app/config.php file.
If you want to modify passport migration or just want it inside your migrations folder you can publish passport migrations files to your migrations folder using publish command:
php artisan vendor:publish --tag=passport-migrations
Make sure you have PassportServiceProvider registered in config/app.php
// config/app.php
Laravel\Passport\PassportServiceProvider::class,
You can also delete from migrations table specific migration(s). Running php artisan migrate again should recreate specific migrations only.

How can I migrate my new migration file in Laravel?

sorry for silly question but I'm really facing problem. After migrating all the migration files. When I need another features for my project I have to make another table but When I'm going to migrate the new table using "php artisan migrate:rollback" or "php artisan migrate:rollback step=17" .... all the migration files are migrating this time too and I am losing all previous data. Then How can I migrate only the new one?
To migrate only new migrations is simple: php artisan migrate. The way the process works is that Laravel creates a table in your database called migrations. In that table are the names of the migrations that have been run already. If there are new migrations the above command will work.
You can read more about running migrations in the documentation.
To migrate any new migration created php artisan migrate is the artisan command.
To get the details of all commands php artisan is the artisan command.
To get the details of any specific command php artisan help command-name-here.
In the case of creating a new file, you only need to run php artisan migrate again.
If you want modify original migration file and migrate it again, you can use this package to migrate.
First, install package in your Laravel project:
composer require caloskao/migrate-specific
Register command at app/Console/Kernel.php :
protected $commands = [
\CalosKao\MigrateSpecific::class
];
Now, run this command to migrate your file
php artisan migrate:specific database/migrations/table.php

Laravel 5.2 restoring php artisan make:auth changes.

I have generated login using php artisan make:auth command in laravel 5.2. I do not need it any more. I want to remove this login/logout/signup and other files generated by this command. HOW ?
They are located in \resources\views\Auth\ , also there is a route you should remove it from your Route.php
Route::auth();

Resources