<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Subcategory;

class Story extends Model
{
    protected $table      = 'storys';
    protected $primaryKey = 'story_id';
    protected $fillable   = [
                                'subcategory_id',
                                'story_image',
                            ];
    protected $hidden     = [
                                'created_at',
                                'updated_at',
                            ];

    public function subcategorydetails() {
        return $this->hasMany(Subcategory::class, 'subcategory_id', 'subcategory_id');
    }
}
