Update models

This commit is contained in:
Daniel Supernault 2023-01-21 07:48:27 -07:00
parent 796e374040
commit 7e333059fb
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
11 changed files with 20 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class Like extends Model
* @var array
*/
protected $dates = ['deleted_at'];
protected $fillable = ['profile_id', 'status_id'];
protected $fillable = ['profile_id', 'status_id', 'status_profile_id'];
public function actor()
{

View File

@ -19,6 +19,8 @@ class Media extends Model
*/
protected $dates = ['deleted_at'];
protected $guarded = [];
protected $casts = [
'srcset' => 'array'
];

View File

@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model;
class MediaTag extends Model
{
protected $guarded = [];
public function status()
{
return $this->belongsTo(Status::class);

View File

@ -16,6 +16,8 @@ class Mention extends Model
*/
protected $dates = ['deleted_at'];
protected $guarded = [];
public function profile()
{
return $this->belongsTo(Profile::class, 'profile_id', 'id');

View File

@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
class Conversation extends Model
{
use HasFactory;
protected $fillable = ['from_id', 'to_id'];
}

View File

@ -11,6 +11,7 @@ class Portfolio extends Model
use HasFactory;
public $fillable = [
'profile_id',
'active',
'show_captions',
'show_license',

View File

@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
class UserPronoun extends Model
{
use HasFactory;
protected $guarded = [];
}

View File

@ -8,6 +8,8 @@ class Report extends Model
{
protected $dates = ['admin_seen'];
protected $guarded = [];
public function url()
{
return url('/i/admin/reports/show/'.$this->id);

View File

@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model;
class ReportComment extends Model
{
protected $guarded = [];
public function profile()
{
return $this->belongsTo(Profile::class);

View File

@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model;
class ReportLog extends Model
{
protected $guarded = [];
public function profile()
{
return $this->belongsTo(Profile::class);

View File

@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
class StatusArchived extends Model
{
use HasFactory;
protected $guarded = [];
}