Modifica della Migration
Aprite il file di migrazione appena creato (si trova nella cartella /database/migrations/ ) e aggiungete il body dei metodi up() e down() :
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
public function up() { Schema::create('pictures', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('url'); $table->timestamps(); }); } public function down() { Schema::dropIfExists('pictures'); } |
Infine, eseguite il comando:
|
1 |
php artisan migrate |
A questo punto il database è pronto!