chave estrangeira laravel
Schema::table('posts', function (Blueprint $table) {
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
});
OR
Schema::table('posts', function (Blueprint $table) {
$table->foreignId('user_id')->constrained();
});
laravel make model with migration and controller
php artisan make:model Todo -mcr
rollback da migração
php artisan migrate:rollback
criar a migração laravel
php artisan make:migration create_users_table
laravel fazer Modelo e migração
php artisan make:model Settings -m
artesã fazer a migração com o modelo
php artisan make:Model Status -m