i just installed laravel 5.2, and i created auth register, login, and reset password, but now i want create a index of my project where all user (also not logged) can access. i tryed to create
Route::get('/',HomeController@home');
But this view is enable only for users logged.
MY ROUTES
Route::auth();
Route::get('/home', 'HomeController@index');
// POST - FORM CREA
Route::get('/crea-regalo', 'PostController@form');
Route::post('/crea-regalo', 'PostController@creaPost');
// LISTA ANNUNCI PRINCIPALE
Route::get('/', 'HomeController@home');
MY HOME CONTROLLER
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$posts = Post::orderBy('id','DESC');
return view('home', compact('posts'));
}
public function home()
{
$posts = Post::all();
return view('index', compact('posts'));
}
}
How can i create routes of view where ALL users can access?
Thank you for your help!