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.
1.4m articles
1.4m replys
5 comments
57.0k users