Add status model, migration, controller

This commit is contained in:
Daniel Supernault 2018-04-15 19:18:59 -06:00
parent 9dd58c5abd
commit 7221f44e4a
3 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class StatusController extends Controller
{
//
}

10
app/Status.php Normal file
View file

@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Status extends Model
{
//
}

View file

@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateStatusesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('statuses', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('profile_id')->nullable();
$table->string('caption')->nullable();
$table->boolean('is_nsfw')->default(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('statuses');
}
}