Hi i add this code in the construct function of the controller $this->middleware('auth'); and works fine but when i wrote this $this->middleware('auth', ['only' => 'create']); it gives me Error Exception says Trying to get property of non-object !! what is wrong?
That function works fine for me. Try a different middleware as a test
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community