php – I defined many to many relationship between two table and i successfully ran the migration and seeder… but it didn’t work

I want to create many to many relationships between user and schedule This is my user model <?php namespace AppModels; use AppModelsMajor; use AppModelsScore; use AppModelsSchedule; use LaravelSanctumHasApiTokens; use IlluminateNotificationsNotifiable; use IlluminateContractsAuthMustVerifyEmail; use IlluminateDatabaseEloquentCastsAttribute; use IlluminateDatabaseEloquentFactoriesHasFactory; use IlluminateFoundationAuthUser as Authenticatable; class User extends Authenticatable { use HasApiTokens, HasFactory, Notifiable; /** * The attributes that are … Read more