Course api beginnings

This commit is contained in:
Ben Ramey
2017-11-06 23:10:28 -06:00
parent f4ad56f52a
commit 7deaddf704
7 changed files with 139 additions and 2 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCoursesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('courses', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('name', 250)->unique();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('courses');
}
}