Cree las rutas para la creacion de projectos

This commit is contained in:
Daniel Cortés
2019-07-03 01:28:51 -04:00
parent b15c2dc658
commit 53b709c175
22 changed files with 491 additions and 17 deletions

View File

@@ -20,10 +20,27 @@ class CreateBaseDb extends Migration
$table->longText('md');
$table->timestamps();
});
Schema::create('projects', function(Blueprint $table) {
$table->bigIncrements('id');
$table->string('title');
$table->longText('md');
$table->timestamps();
});
Schema::create('projects_photos', function(Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('project_id')->unsigned();
$table->foreign('project_id')->references('id')->on('projects');
$table->string('filename');
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('projects_photos');
Schema::dropIfExists('projects');
Schema::dropIfExists('now');
Schema::dropIfExists('posts');
}