diff --git a/app/Http/Controllers/LikeController.php b/app/Http/Controllers/LikeController.php new file mode 100644 index 000000000..6847a9a4b --- /dev/null +++ b/app/Http/Controllers/LikeController.php @@ -0,0 +1,10 @@ +belongsTo(Profile::class); + } + + public function status() + { + return $this->belongsTo(Status::class); + } +} diff --git a/database/migrations/2018_04_17_012812_create_likes_table.php b/database/migrations/2018_04_17_012812_create_likes_table.php new file mode 100644 index 000000000..8c9d64928 --- /dev/null +++ b/database/migrations/2018_04_17_012812_create_likes_table.php @@ -0,0 +1,35 @@ +bigIncrements('id'); + $table->bigInteger('profile_id')->unsigned(); + $table->bigInteger('status_id')->unsigned(); + // Flag to remove spammy profile_ids + $table->boolean('flagged')->default(false); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('likes'); + } +}