Hello @kartik,
Use middleware for this purpose and then in controller constructor use it as in example below.
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
And then you need to secure routes where you want from user to be logged in to access.
Route::group(['middleware' => 'auth'], function() {
Route::get('/dashboard', 'DashboardController@index');
});
Hope it helps!!
Thank You!!