mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 17:59:22 +02:00

* phpstan v1 + workflow * Fix intend * More fixes * Update phpstan.neon * phpstan level 2 * Move errors ignoring into phpstan.neon * phpstan level 3 * Don't ignore templates folder * Something from level 4 * Update phpstan.neon
38 lines
710 B
PHP
38 lines
710 B
PHP
<?php
|
|
|
|
namespace MyAAC\Models;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property string $name
|
|
* @property string $title
|
|
* @property int $php
|
|
* @property int $hide
|
|
*/
|
|
class Pages extends Model {
|
|
|
|
protected $table = TABLE_PREFIX . 'pages';
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = ['name', 'title', 'body', 'date', 'player_id', 'php', 'enable_tinymce', 'access', 'hide'];
|
|
|
|
protected $casts = [
|
|
'player_id' => 'integer',
|
|
'enable_tinymce' => 'integer',
|
|
'access' => 'integer',
|
|
'hide' => 'integer',
|
|
];
|
|
|
|
public function player()
|
|
{
|
|
return $this->belongsTo(Player::class);
|
|
}
|
|
|
|
public function scopeIsPublic($query) {
|
|
$query->where('hide', '!=', 1);
|
|
}
|
|
|
|
}
|