Current File : //proc/thread-self/root/proc/self/root/home/tradevaly/www/app/Models/Tradeshows.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Tradeshows extends Model
{
    use HasFactory;
    
     protected static function boot() {
        parent::boot();

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