I don't know how you have set up the flow but here is something that should probably work.
Inside the BrandController add this to the constructor.
$this->middleware(['auth'']);
Next, the index function inside the controller should look like this:
public function index() { $brands = Brands::all(); return view('brands.index'); }
Then use the Route directly as:
Route:get(/brands, BrandController@index);
Thanks a lot
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't know how you have set up the flow but here is something that should probably work.
Inside the BrandController add this to the constructor.
Next, the index function inside the controller should look like this:
Then use the Route directly as:
Thanks a lot