@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\Auth; | |||||
class UserController extends Controller | class UserController extends Controller | ||||
{ | { | ||||
public function create(Request $request) { | public function create(Request $request) { | ||||
Log::("it works") | |||||
$validated = $request->validate([ | $validated = $request->validate([ | ||||
'name' => 'required', | 'name' => 'required', | ||||
'email' => 'required|email|unique:users', | 'email' => 'required|email|unique:users', | ||||
@@ -0,0 +1,45 @@ | |||||
<?xml version="1.0" encoding="iso-8859-1"?> | |||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | |||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |||||
viewBox="0 0 90 90" style="enable-background:new 0 0 29.107 29.107;" xml:space="preserve"> | |||||
<g> | |||||
<g id="c147_full_moon"> | |||||
<g> | |||||
<path d="M14.554,0C6.561,0,0,6.562,0,14.552c0,7.996,6.561,14.555,14.554,14.555c7.996,0,14.553-6.559,14.553-14.555 | |||||
C29.106,6.562,22.55,0,14.554,0z"/> | |||||
</g> | |||||
</g> | |||||
<g id="Capa_1_14_"> | |||||
</g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
</svg> |
@@ -0,0 +1,45 @@ | |||||
<?xml version="1.0" encoding="iso-8859-1"?> | |||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | |||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |||||
width="44.56px" height="44.56px" viewBox="0 0 44.56 44.56" style="enable-background:new 0 0 44.56 44.56;" xml:space="preserve" | |||||
> | |||||
<g> | |||||
<g> | |||||
<path d="M23.297,38.74c-1.17,1.588-2.992,2.564-4.962,2.661c-1.97,0.098-3.878-0.696-5.198-2.162L1.308,26.112 | |||||
c-1.88-2.085-1.713-5.299,0.372-7.179c2.087-1.88,5.299-1.712,7.179,0.374l8.369,9.288c0.124,0.138,0.304,0.212,0.489,0.203 | |||||
c0.186-0.009,0.356-0.102,0.467-0.25L35.386,5.217c1.665-2.26,4.847-2.741,7.108-1.075c2.259,1.666,2.739,4.848,1.073,7.107 | |||||
L23.297,38.74z"/> | |||||
</g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
<g> | |||||
</g> | |||||
</svg> |
@@ -0,0 +1 @@ | |||||
<svg id="bold" fill="#63b521" enable-background="new 0 0 10 10" preserveAspectRatio="xMidYMid meet" height="20px" width="20px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g><path d="m9.707 19.121c-.187.188-.442.293-.707.293s-.52-.105-.707-.293l-5.646-5.647c-.586-.586-.586-1.536 0-2.121l.707-.707c.586-.586 1.535-.586 2.121 0l3.525 3.525 9.525-9.525c.586-.586 1.536-.586 2.121 0l.707.707c.586.586.586 1.536 0 2.121z"/></g></svg> |
@@ -26,6 +26,7 @@ function getToken() { | |||||
}).then( () => { | }).then( () => { | ||||
token = getCookie('XSRF-TOKEN') | token = getCookie('XSRF-TOKEN') | ||||
}) | }) | ||||
app.token = token | |||||
} | } | ||||
function login(event) { | function login(event) { | ||||
@@ -65,6 +66,8 @@ if (!token) {getToken()} | |||||
if (window.location.pathname == '/') { | if (window.location.pathname == '/') { | ||||
document.getElementById('nav_toggle').addEventListener('click', toggleNav) | document.getElementById('nav_toggle').addEventListener('click', toggleNav) | ||||
document.getElementById('login_form').addEventListener('submit', login) | document.getElementById('login_form').addEventListener('submit', login) | ||||
app.token = token | |||||
// console.log(app.token) | |||||
// console.log(app.$data.active) | // console.log(app.$data.active) | ||||
//Triggers for registration menu | //Triggers for registration menu | ||||
@@ -57,11 +57,11 @@ | |||||
fetch("/register", { | fetch("/register", { | ||||
method: 'POST', | method: 'POST', | ||||
headers: {'Content-Type': 'application/json', | headers: {'Content-Type': 'application/json', | ||||
'X-XSRF-TOKEN': window.token}, | |||||
'X-XSRF-TOKEN': this.token}, | |||||
body: JSON.stringify({"name": document.getElementById("register-name").value, | body: JSON.stringify({"name": document.getElementById("register-name").value, | ||||
"email": document.getElementById("register-email").value, | "email": document.getElementById("register-email").value, | ||||
"password": document.getElementById("register-password").value}), | |||||
"password_confirmation": document.getElementById("confirm-password").value}) | |||||
"password": document.getElementById("register-password").value, | |||||
"password_confirmation": document.getElementById("confirm-password").value})}) | |||||
.then(response => { | .then(response => { | ||||
//Give completed or error | //Give completed or error | ||||
if (response.ok) { | if (response.ok) { | ||||
@@ -71,7 +71,7 @@ | |||||
this.errorMessage = response.statusText | this.errorMessage = response.statusText | ||||
this.active = 'error' | this.active = 'error' | ||||
} | } | ||||
console.log(response.json()) | |||||
console.log(response) | |||||
}); | }); | ||||
event.preventDefault(); | event.preventDefault(); | ||||
} | } | ||||
@@ -89,7 +89,7 @@ | |||||
module.exports = { | module.exports = { | ||||
data() { | data() { | ||||
return {active: 'register'} | |||||
return {active: 'register', token: ''} | |||||
}, | }, | ||||
methods: { | methods: { | ||||
register, | register, | ||||
@@ -44,11 +44,15 @@ ul { | |||||
} | } | ||||
li { | li { | ||||
padding-bottom: 8px; | |||||
&:before { | &:before { | ||||
content: url("/images/green-check.svg"); | |||||
margin-right: 4px; | |||||
width: 30px; | |||||
height: 30px; | |||||
content: url("../images/green-check.svg"); | |||||
display: inline; | |||||
margin-right: 5px; | |||||
// top: 30px; | |||||
} | } | ||||
padding-bottom: 8px; | |||||
} | } | ||||
a { | a { | ||||
@@ -206,8 +210,8 @@ form.login .login-btn { | |||||
} | } | ||||
div.blue-background { | div.blue-background { | ||||
background-image: url("/images/polka-dots.png"); | |||||
background-size: 350px; | |||||
background-image: url("../images/black-circle.svg"); | |||||
background-size: 10px; | |||||
background-color: #0d324d; | background-color: #0d324d; | ||||
} | } | ||||
@@ -41,6 +41,7 @@ Route::post('/resend-verification', function (Request $request) { | |||||
})->middleware(['auth', 'throttle:6,1'])->name('verification.send'); | })->middleware(['auth', 'throttle:6,1'])->name('verification.send'); | ||||
Route::post('/register', [UserController::class, 'create']); | Route::post('/register', [UserController::class, 'create']); | ||||
Route::view('/register', 'home'); | |||||
Route::get('/forgot-password', function () { | Route::get('/forgot-password', function () { | ||||
return view('request-reset'); | return view('request-reset'); | ||||