engelsystem/src/Models/User/HasUserModel.php

37 lines
722 B
PHP
Raw Normal View History

2018-10-06 14:15:54 +02:00
<?php
declare(strict_types=1);
2018-10-06 14:15:54 +02:00
namespace Engelsystem\Models\User;
use Engelsystem\Models\BaseModel;
abstract class HasUserModel extends BaseModel
{
use UsesUserModel;
2018-10-06 14:15:54 +02:00
/** @var string The primary key for the model */
protected $primaryKey = 'user_id'; // phpcs:ignore
2018-10-06 14:15:54 +02:00
/**
* The attributes that are mass assignable.
*
* @var array<string>
*/
protected $fillable = [ // phpcs:ignore
2018-10-06 14:15:54 +02:00
'user_id',
];
/** @var array<string> */
protected $casts = [ // phpcs:ignore
'user_id' => 'integer',
];
/**
* The relationships that should be touched on save
*
* @var array<string>
*/
protected $touches = ['user']; // phpcs:ignore
2018-10-06 14:15:54 +02:00
}