Anons79 Mini Shell

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

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class PostKategori extends Model
{
    public $table = 'post_category';

    public $fillable = [
        'title',
        'description',
        'slug'
    ];

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

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

    public function posts(): \Illuminate\Database\Eloquent\Relations\HasMany
    {
        return $this->hasMany(\App\Models\Post::class, 'post_category_id');
    }
}

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