Can we not do the same in Laravel ?
@anjanesh No. You need to create a migration for the schema change you want to happen.
Laravel doesn’t have a built-in command to “diff” your current schema with your models.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
In Django if we want new columns to a table, I'll add the code in the models.py file then do
python3 manage.py makemigrations
python3 manage.py migrate
Can we not do the same in Laravel ? If I understand correctly, in Laravel we have to make the changes in application/migrations and not in the model directly ?
Firstphp artistan migrate:make users_table_add_hometown
Add in class Users_Table_Add_Hometown, $table->string('hometown');
and then
php artisan migrate
Migrations are the classes we use to alter the database schema, so yes, in Laravel we make a new migration with the schema change(s) and then migrate.
Please or to participate in this conversation.