Skip to content
Snippets Groups Projects
Commit ef55d278 authored by tomaszrudowski's avatar tomaszrudowski
Browse files

blade, sign up config

parent 174f3e96
Branches
No related tags found
1 merge request!1Master
......@@ -13,6 +13,8 @@ DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
SIGN_UP=false
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
......
......@@ -229,4 +229,6 @@ return [
],
'sign-up' => env('SIGN_UP', false)
];
......@@ -8,7 +8,8 @@
<div class="card-header">{{ __('Register') }}</div>
<div class="card-body">
<form method="POST" action="{{ route('register') }}">
@if(config('app.sign-up'))
<form method="POST" action="{{ route('register') }}">
@csrf
<div class="form-group row">
......@@ -69,6 +70,10 @@
</div>
</div>
</form>
@else
<i>Sign up disabled. Contact admin to register.</i>
@endif
</div>
</div>
</div>
......
......@@ -40,7 +40,7 @@
<li class="nav-item">
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
</li>
@if (Route::has('register'))
@if (Route::has('register') && config('app.sign-up'))
<li class="nav-item">
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
</li>
......
......@@ -72,8 +72,8 @@
@else
<a href="{{ route('login') }}">Login</a>
@if (Route::has('register'))
<a href="{{ route('register') }}">Register</a>
@if (Route::has('register') && config('app.sign-up'))
<a href="{{ route('register') }}">Sign up</a>
@endif
@endauth
</div>
......@@ -81,18 +81,14 @@
<div class="content">
<div class="title m-b-md">
Laravel
LD sim
</div>
<div class="links">
<a href="https://laravel.com/docs">Docs</a>
<a href="https://laracasts.com">Laracasts</a>
<a href="https://laravel-news.com">News</a>
<a href="https://blog.laravel.com">Blog</a>
<a href="https://nova.laravel.com">Nova</a>
<a href="https://forge.laravel.com">Forge</a>
<a href="https://vapor.laravel.com">Vapor</a>
<a href="https://github.com/laravel/laravel">GitHub</a>
<a href="{{ route('login')}}">Login</a>
@if (Route::has('register') && config('app.sign-up'))
<a href="{{ route('register') }}">Sign up</a>
@endif
</div>
</div>
</div>
......
......@@ -16,7 +16,7 @@ use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
});
})->name('welcome');
Auth::routes([
'login' => true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment