Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
33 lines
569 B
PHP
33 lines
569 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Link extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name',
|
|
'url',
|
|
'note',
|
|
'display_order',
|
|
'visible',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'display_order' => 'integer',
|
|
'visible' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function scopeVisible(Builder $query): Builder
|
|
{
|
|
return $query->where('visible', true);
|
|
}
|
|
}
|