add models and relations

This commit is contained in:
2018-07-12 21:56:07 +02:00
parent ce88fd3978
commit 34df868d57
11 changed files with 230 additions and 19 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Report (something objectionable spotted by a user)
*/
class ContentReport extends Model
{
/** Authoring user */
public function author()
{
return $this->belongsTo(User::class, 'author_id');
}
/** Authoring user */
public function object()
{
return $this->morphTo();
}
}