mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Add status model, migration, controller
This commit is contained in:
parent
9dd58c5abd
commit
7221f44e4a
3 changed files with 54 additions and 0 deletions
10
app/Http/Controllers/StatusController.php
Normal file
10
app/Http/Controllers/StatusController.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class StatusController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
10
app/Status.php
Normal file
10
app/Status.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Status extends Model
|
||||
{
|
||||
//
|
||||
}
|
|
@ -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');
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue