Davhoj
Davhoj

Reputation: 91

Laravel Breeze not generating migrations

Im following Laravel Breeze Guide from Laravel's oficial page and after installing Breeze package I don't see any new migration

these are the lines i executed

curl -s https://laravel.build/prueba | bash
 
cd example-app
 
php artisan migrate

at this point I have created a new Laravel application and php artisan migrate create tables correctly in my DB

composer require laravel/breeze --dev

php artisan breeze:install
 
npm install
npm run dev
php artisan migrate

at this point I have all the views for the authentication generated thanks to Breeze. but when php artisan migrate is executed the response I get is

enter image description here

What am I doing wrong?

Upvotes: 2

Views: 1306

Answers (5)

Assad Iqbal Khan
Assad Iqbal Khan

Reputation: 1

I got the same problem. But what i found out is: Laravel/Breeze doesn't auto work with Phpmyadmin. Becuase after installing breeze, if we go to the .env file

enter image description here,

DB connection is sqlite and all the data generated live stored in directory project_name/database/database.sqlite.

enter image description here

In case you want to use phpmyadmin with laravel/breeze, you have to make some modification in codes and also in .env file.

Upvotes: 0

Andath
Andath

Reputation: 22724

That simply means you run your migrations before you even installed Laravel/Breeze.

The documentation is a bit misleading because it says we should run php artisan migrate following the installation of Breeze because it assumes we just started a fresh Laravel project to which we added Breeze before running the migrations (and that is actually the recommended way to add Laravel/Breeze because, for instance, it overrides all the routes you may have declared in routes/api.php)

Otherwise, Laravel/breeze does not come with any new migration to run. You can actually check that on its official source code.

Upvotes: 0

Amir Reza Tavakolian
Amir Reza Tavakolian

Reputation: 51

i had this problem too, finally i created the table manually

    public function up()
{
    Schema::create('users', function (Blueprint $table) {
        $table->id();
        $table->timestamps();   
        $table->string('name', 250);
        $table->string('email', 250);
        $table->string('password', 250);
    });
}

Upvotes: 0

Dominic
Dominic

Reputation: 1

Try to move your folder to a directory which doesn't have any weird symbols in the name. Like: [Code] <- php doesn't always like this :)

Upvotes: 0

omeronlines
omeronlines

Reputation: 38

Check migration exists in the migration folder if yes then try check your database connection php artisan migrate:refresh

Upvotes: 0

Related Questions