<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\UserController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('index', config('settings'));
});
Route::get('/login', function () {
return view('login', config('settings'));
});
<!--resources/views/login.blade.php-->
@include('partials/header')
<link href="{{ asset('styles/login.css') }}" rel='stylesheet' />
<div class='Login'>
<div class='title'>ទំព័រចុះឈ្មោះចូលទំព័រគ្រប់គ្រង</div>
<form action="<?php echo url('/login') ?>" method='post'>
@csrf
<a>Email: </a><input type="email" name="email" required />
<a>ពាក្យសំងាត់ៈ</a><input type='password' name='password' required />
<a></a><input type='submit' value='បញ្ជូន' />
<a></a><div class='message'>{{ $message }}</div>
</form>
</div>
@include('partials/footer')
.Login{
width: 400px;
margin: 20px auto 0;
background: var(--background-dark);
}
.Login form{
display: grid;
grid-template-columns: 20% auto;
grid-gap: 5px;
align-items: center;
padding: 20px
}
.Login .title{
color: white;
text-align: center;
font: 18px/1.5 Oswald, Koulen;
padding: 5px 0;
border-bottom: 1px solid white;
}
.Login a{
color: white;
text-align: right;
}
.Login input{
font: var(--body-font);
padding: 0 10px;
}
.Login form .message{
text-align: center;
color: white;
}
GitHub: https://github.com/Sokhavuth/laravel
Heroku: http://khmerweb-laravel.herokuapp.com/