'boolean', ]; protected $fillable = [ 'category_name', 'vehicle_type' ]; protected $dates = [ 'created_at', 'updated_at' ]; public function vehicle() { return $this->hasMany(Vehicles::class, 'type'); } public function showWinner() { return $this->hasMany(CarShowWinner::class, 'category'); } public function scopeVehtype($query) { return $query->where('vehicle_type', 1)->orderBy('category_name'); } }