BelongsToMany

app/Models/Instance/Student/Student.php use Illuminate\Database\Eloquent\Model; class Student extends Model { // public function calls() { return $this->belongsToMany(Call::class, 'student_call', 'student_id', 'call_id') ->withPivot('acc_id', 'contact_id') ->withTimestamps(); } // } database/migrations/2022_12_09_145956_create_student_call_table.php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use…

Continue ReadingBelongsToMany