update branch
This commit is contained in:
101
resources/views/hulaki_khabar/Auth/login.blade.php
Normal file
101
resources/views/hulaki_khabar/Auth/login.blade.php
Normal file
@ -0,0 +1,101 @@
|
||||
@extends('hulaki_khabar.layout.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="page-title-area">
|
||||
<div class="container">
|
||||
<div class="page-title-content">
|
||||
<h2>लगइन</h2>
|
||||
<ul>
|
||||
<li><a href="index.php">होमपेज</a></li>
|
||||
<li>लगइन</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Page Banner -->
|
||||
|
||||
<!-- Start Login Area -->
|
||||
<section class="login-area ptb-50">
|
||||
<div class="container">
|
||||
<div class="login-form">
|
||||
<h2>लगइन फर्म</h2>
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label>युजरनेम</label>
|
||||
<input type="text" class="form-control" placeholder="युजरनेम">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>पासवर्ड </label>
|
||||
<input type="text" class="form-control" placeholder="पासवर्ड">
|
||||
</div>
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="checkme">
|
||||
<label class="form-check-label" for="checkme"> याद राख्नुहोस</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 lost-your-password">
|
||||
<a href="#" class="lost-your-password">पासवर्ड बिर्सिनुभयो?</a>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit">लगइन</button>
|
||||
</form>
|
||||
<div class="important-text">
|
||||
<p>खाता छैन? <a href="{{route('userRegister')}}">रजिस्टर गर्नुहोस !</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#login-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var form = $(this);
|
||||
let email = $('#email').val();
|
||||
let password = $('#password').val();
|
||||
let rememberme = $('#remember-me').val();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: form.attr('action'),
|
||||
data: {
|
||||
email: email,
|
||||
password: password,
|
||||
remember_me: rememberme,
|
||||
_token: "{{ csrf_token() }}"
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Success',
|
||||
text: response.message
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = response.redirect_url;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Error',
|
||||
text: response.message
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
let err = JSON.parse(xhr.responseText);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Error',
|
||||
text: err.message || 'An error occurred during the request.'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
106
resources/views/hulaki_khabar/Auth/registration.blade.php
Normal file
106
resources/views/hulaki_khabar/Auth/registration.blade.php
Normal file
@ -0,0 +1,106 @@
|
||||
@extends('hulaki_khabar.layout.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="page-title-area">
|
||||
<div class="container">
|
||||
<div class="page-title-content">
|
||||
<h2>रजिस्टर</h2>
|
||||
<ul>
|
||||
<li><a href="index.php">होमपेज</a></li>
|
||||
<li>रजिस्टर</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Page Banner -->
|
||||
|
||||
<!-- Start Register Area -->
|
||||
<section class="register-area ptb-50">
|
||||
<div class="container">
|
||||
<div class="register-form">
|
||||
<h2>रजिस्टर</h2>
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label>नाम</label>
|
||||
<input type="text" class="form-control" placeholder="नाम">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>ईमेल</label>
|
||||
<input type="text" class="form-control" placeholder="ईमेल">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>फोन</label>
|
||||
<input type="text" class="form-control" placeholder="फोन">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>पासवर्ड</label>
|
||||
<input type="text" class="form-control" placeholder="पासवर्ड">
|
||||
</div>
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="checkme">
|
||||
<label class="form-check-label" for="checkme">पासवर्ड हेर्नुहोस?</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit">रजिस्टर गर्नुहोस</button>
|
||||
</form>
|
||||
<div class="important-text">
|
||||
<p>खाता छ? <a href="{{route('userLogin')}}">लगइन गर्नुहोस!</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$('#rregister-form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
let form = $(this);
|
||||
let name = $('#name').val();
|
||||
let email = $('#email').val();
|
||||
let password = $('#password').val();
|
||||
let password_confirmation = $('#password_confirmation').val();
|
||||
$.ajax({
|
||||
url: form.attr('action'),
|
||||
type: "POST",
|
||||
data: {
|
||||
name: name,
|
||||
email: email,
|
||||
password: password,
|
||||
password_confirmation: password_confirmation,
|
||||
_token: "{{ csrf_token() }}"
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Success',
|
||||
text: response.message
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = response.redirect_url;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Error',
|
||||
text: response.message
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
let err = JSON.parse(xhr.responseText);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Error',
|
||||
text: err.message || 'An error occurred during the request.'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
Reference in New Issue
Block a user