%PDF- %PDF-
Direktori : /home/forge/api-takeaseat.eco-n-tech.co.uk/app/Models/ |
Current File : //home/forge/api-takeaseat.eco-n-tech.co.uk/app/Models/Session.php |
<?php namespace App\Models; use Spatie\Sluggable\HasSlug; use Spatie\Sluggable\SlugOptions; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Session extends Model { use HasFactory, HasSlug; /** * Get the options for generating the slug. */ public function getSlugOptions() : SlugOptions { return SlugOptions::create() ->generateSlugsFrom('name') ->saveSlugsTo('slug'); } /** * Get the therapists for this session type */ public function therapists() { return $this->belongsToMany(Therapist::class, 'session_therapist', 'session_id', 'therapist_id'); } }