paginate(10)->withQueryString(); } public function create(array $data): User { $user = User::create($data['credentials']); $teacher = Teacher::create($data['user_data']); $teacher->user()->save($user); return $teacher; } public function update($model, array $data): User { $model->update($data); return $model; } public function delete($model): void { $model->destroy(); } }