Doing my first laravel project I've stuck myself trying to make a routing with laravel. What i want is when entering localhost and not logged in then display my login page
This is how my login page looks like, register is almost the same with different fields/form action
@extends('layout.app')
@section('content')
<style>
body {
background: url{{asset('img/bg.jpg')}} no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
<div class="container h-100 d-flex justify-content-center">
<div class="row">
<div class="col-lg-6">
<div class="jumbotron">
<h1>WEB_NAME</h1>
<hr>
<h2>The place where your ideas may come real</h2>
<hr>
<p>Add your ideas and let others help you with your plans, vote other's ideas and discuss about
them</p>
</div>
</div>
<div class="col-lg-6">
<h1>Login below</h1>
<form action="../index.php" method="post">
<div class="form-group">
<div class="col-xs-3 col-lg-6">
<label for="email">Email:</label>
<input type="email" class="form-control" name="email" id="email">
</div>
</div>
<div class="form-group">
<div class="col-xs-3 col-lg-6">
<label for="password">Password:</label>
<input type="password" class="form-control" name="password" id="password">
</div>
</div>
<p><input type="submit" name="submit" value="Login" class="btn btn-primary btn-lg" role="button">
<input type="reset" value="Register" class="btn btn-success btn-lg" role="button"
href="register.html">
</p>
</form>
</div>
</div>
</div>
@endsection
This is the app layout page
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{config('app.name','SOCIAL IDEAS')}}</title>
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<!-- Styles -->
<link href="{{ asset('vendor/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet"/>
</head>
<body>
<div id="app">
@include('inc.navbar')
<div class="container">
@yield('content')
</div>
<footer class="bg-dark">
<div class="container">
<p class="m-0 text-center text-white">Footer note</p>
</div>
</footer>
</div>
<script src="{{asset('vendor/jquery/jquery.js')}}"></script>
<script src="{{asset('vendor/bootstrap/js/bootstrap.min.js')}}"></script>
<script src="{{asset('js/bootstrap-notify.min.js')}}"></script>
<script src="{{asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')}}"></script>
<script>
CKEDITOR.replace('article-ckeditor');
</script>
</body>
</html>
Routing looks like this
Route::get('/', "PagesController@index");
Route::resource("posts", "PostsController");
Auth::routes();
Route::get('/dashboard', 'DashboardController@index');
How i am supposed to make the app work like i'm expecting: User enters website, if authenticated goes to page. If not then its redirected automatically to login page. After logged it it goes to same page as the one above This project would be a social network website. Users join, make a post, follow others and see other posts
The problem right now is the fact that when entering localhost/ it gets a blank page. Seeing source code of page it seems it does @include a modal from create.blade.php before layout even tho there is no modal in the layout page, that modal exists in my project but its not @included anywhere