slug = Str::slug($list->name); }); static::updating(function ($list) { $list->slug = Str::slug($list->name); }); } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function games(): BelongsToMany { return $this->belongsToMany(Game::class) ->with(['platforms']) ->withTimestamps(); } }