Current File : //home/tradevaly/new.tradevaly.com.bd/app/Models/Package.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Package extends Model
{
    use HasFactory;
   public function features(){
        return $this->hasMany(PackageFeature::class);
    }
    
      protected static function boot() {
        parent::boot();

        static::creating(function ($question) {
            $question->slug = Str::slug($question->name);
        });
    }
}