master_template/resources/views/hulaki_khabar/Auth/registration.blade.php

107 lines
4.2 KiB
PHP
Raw Normal View History

2024-06-13 15:17:05 +00:00
@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