I'm trying to use auth middleware within my controller at construct method with except argument and it does not working.
I created my controller with artisan command and its contains methods like create, edit, show, etc.
here is my construct:
public function __construct()
{
$this->middleware('auth', ['except' => ['index', 'show']]);
}
if i visit some methods like edit and create when i'm not logged in middleware does not works and i can see the content. i also tried only instead of except, same result.