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