public function authorize() { $id = $this->route('teacher'); return Teacher::where('id', $id)->exists(); }