Add news tables and models #52

This commit is contained in:
Nabeel Shahzad
2018-01-08 09:02:55 -06:00
parent 247310b4e7
commit 8d65462084
3 changed files with 77 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateNewsTable extends Migration
{
public function up()
{
Schema::create('news', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id');
$table->string('subject');
$table->text('body');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('news');
}
}