This is a part of the code.
class StudentController extends Controller { public function __construct(Request $request) { $school = session('school_data'); $this->middleware($school); } }
Now, I've also tried checking the $school by using dd($school) but it returns null
$school
dd($school)
null
NOTE: The session variable works in other functions inside the same controller.
2.1m questions
2.1m answers
60 comments
57.0k users