fix:changes auth blade and controllers
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
use App\Enums\AdminStatus;
|
use App\Enums\AdminStatus;
|
||||||
use App\Http\Requests\AuthLoginPostRequest;
|
use App\Http\Requests\AuthLoginPostRequest;
|
||||||
use App\Models\Admin;
|
use App\Models\Admin;
|
||||||
@@ -23,26 +22,26 @@ class AuthController extends controller
|
|||||||
public function loginPost(AuthLoginPostRequest $request)
|
public function loginPost(AuthLoginPostRequest $request)
|
||||||
{
|
{
|
||||||
$admin = Admin::query()
|
$admin = Admin::query()
|
||||||
->whereUsername($request->input('username'))
|
->where('username', $request->input('username'))
|
||||||
->whereStatus(AdminStatus::ENABLE)
|
->where('status', AdminStatus::ENABLE->value)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if (!$admin) {
|
if (!$admin) {
|
||||||
return back()->withErrors([
|
return back()->withErrors([
|
||||||
'general' => 'اطلاعات وارد شده نامعتبر است.'
|
'general' => 'اطلاعات وارد شده نامعتبر است.'
|
||||||
]);
|
])->withInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Hash::check($request->input('password'), $admin->password)) {
|
if (!Hash::check($request->input('password'), $admin->password)) {
|
||||||
return back()->withErrors([
|
return back()->withErrors([
|
||||||
'general' => 'اطلاعات وارد شده نامعتبر است.'
|
'general' => 'اطلاعات وارد شده نامعتبر است.'
|
||||||
]);
|
])->withInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
Auth::guard('admin')->login($admin);
|
Auth::guard('admin')->login($admin);
|
||||||
|
|
||||||
return redirect()->route('admin.dashboard.index');
|
return redirect()->route('admin.dashboard.index');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function logout()
|
public function logout()
|
||||||
{
|
{
|
||||||
Auth::guard('admin')->logout();
|
Auth::guard('admin')->logout();
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\Models\Admin;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
@@ -72,7 +73,7 @@ return [
|
|||||||
],
|
],
|
||||||
'admins' => [
|
'admins' => [
|
||||||
'driver' => 'eloquent',
|
'driver' => 'eloquent',
|
||||||
'model' => \App\Models\Admin::class,
|
'model' => Admin::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
// 'users' => [
|
// 'users' => [
|
||||||
|
|||||||
+48
-48
@@ -1320,7 +1320,7 @@ multi level dropdown menu
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
hero css
|
hero css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.hero-section {
|
.hero-section {
|
||||||
@@ -1640,7 +1640,7 @@ search css
|
|||||||
|
|
||||||
.search-form .static-dropdown.passenger-box .dropdown-menu{
|
.search-form .static-dropdown.passenger-box .dropdown-menu{
|
||||||
left: 0px !important;
|
left: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-form .passenger-box .dropdown-item:hover{
|
.search-form .passenger-box .dropdown-item:hover{
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -1762,7 +1762,7 @@ search css
|
|||||||
.search-form .form-group{
|
.search-form .form-group{
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 991px) {
|
@media all and (max-width: 991px) {
|
||||||
.search-nav{
|
.search-nav{
|
||||||
@@ -1779,7 +1779,7 @@ search css
|
|||||||
top: -30px;
|
top: -30px;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1860,7 +1860,7 @@ date picker
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
time picker css
|
time picker css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.ui-timepicker.ui-widget.ui-widget-content{
|
.ui-timepicker.ui-widget.ui-widget-content{
|
||||||
@@ -1991,7 +1991,7 @@ play btn
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
destination css
|
destination css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.destination-area{
|
.destination-area{
|
||||||
@@ -2217,7 +2217,7 @@ destination css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
flight css
|
flight css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.flight-area{
|
.flight-area{
|
||||||
@@ -2356,7 +2356,7 @@ flight css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
hotel css
|
hotel css
|
||||||
====================== */
|
====================== */
|
||||||
.hotel-area{
|
.hotel-area{
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -2572,7 +2572,7 @@ hotel css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
room type css
|
room type css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.room-type-item{
|
.room-type-item{
|
||||||
@@ -2614,7 +2614,7 @@ room type css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
room css
|
room css
|
||||||
====================== */
|
====================== */
|
||||||
.room-area{
|
.room-area{
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -2815,7 +2815,7 @@ room css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
banner css
|
banner css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.banner-area{
|
.banner-area{
|
||||||
@@ -2894,7 +2894,7 @@ banner css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
tour css
|
tour css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.tour-area{
|
.tour-area{
|
||||||
@@ -3094,7 +3094,7 @@ tour css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
car css
|
car css
|
||||||
====================== */
|
====================== */
|
||||||
.car-area{
|
.car-area{
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -3325,7 +3325,7 @@ car css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
activity css
|
activity css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.activity-area{
|
.activity-area{
|
||||||
@@ -3471,7 +3471,7 @@ activity css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
cruise css
|
cruise css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.cruise-area{
|
.cruise-area{
|
||||||
@@ -3638,7 +3638,7 @@ cruise css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
listing single css
|
listing single css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.listing-header{
|
.listing-header{
|
||||||
@@ -4473,7 +4473,7 @@ listing single css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
deal css
|
deal css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.deal-area{
|
.deal-area{
|
||||||
@@ -4551,7 +4551,7 @@ deal css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
download css
|
download css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.download-area{
|
.download-area{
|
||||||
@@ -4776,14 +4776,14 @@ booking sort
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
flight booking css
|
flight booking css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.flight-booking-item{
|
.flight-booking-item{
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
padding: 20px 20px 15px 20px;
|
padding: 20px 20px 15px 20px;
|
||||||
box-shadow: 0 0 40px 5px rgb(0 0 0 / 5%);
|
box-shadow: 0 0 40px 5px rgb(0 0 0 / 5%);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5199,7 +5199,7 @@ flight booking css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
cart css
|
cart css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.cart-area thead tr {
|
.cart-area thead tr {
|
||||||
@@ -5364,7 +5364,7 @@ cart css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
booking css
|
booking css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.booking-widget {
|
.booking-widget {
|
||||||
@@ -5556,7 +5556,7 @@ booking css
|
|||||||
.order-total span {
|
.order-total span {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #F96768;
|
color: #F96768;
|
||||||
}
|
}
|
||||||
|
|
||||||
.booking-payment-area .nav-link{
|
.booking-payment-area .nav-link{
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
@@ -5613,7 +5613,7 @@ booking css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
booking confirm css
|
booking confirm css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.booking-confirm-content {
|
.booking-confirm-content {
|
||||||
@@ -5688,7 +5688,7 @@ booking confirm css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
about css
|
about css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.about-area {
|
.about-area {
|
||||||
@@ -5843,7 +5843,7 @@ about css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
service css
|
service css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.service-area {
|
.service-area {
|
||||||
@@ -5990,7 +5990,7 @@ service single
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
feature css
|
feature css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.feature-area {
|
.feature-area {
|
||||||
@@ -6047,7 +6047,7 @@ feature css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
video css
|
video css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.video-content {
|
.video-content {
|
||||||
@@ -6119,7 +6119,7 @@ video css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
step/process css
|
step/process css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.process-single {
|
.process-single {
|
||||||
@@ -6203,7 +6203,7 @@ step/process css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
testimonial css
|
testimonial css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.testimonial-area {
|
.testimonial-area {
|
||||||
@@ -6345,7 +6345,7 @@ testimonial css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
counter css
|
counter css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.counter-area {
|
.counter-area {
|
||||||
@@ -6419,7 +6419,7 @@ counter css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
cta-area css
|
cta-area css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.cta-area {
|
.cta-area {
|
||||||
@@ -6469,7 +6469,7 @@ cta-area css
|
|||||||
|
|
||||||
|
|
||||||
/* ========================
|
/* ========================
|
||||||
gallery css
|
gallery css
|
||||||
=========================== */
|
=========================== */
|
||||||
|
|
||||||
.gallery-item {
|
.gallery-item {
|
||||||
@@ -6562,7 +6562,7 @@ gallery css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
mission css
|
mission css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.mission-img{
|
.mission-img{
|
||||||
@@ -6625,7 +6625,7 @@ mission css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
career css
|
career css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.career-item{
|
.career-item{
|
||||||
@@ -6727,7 +6727,7 @@ career css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
career single css
|
career single css
|
||||||
====================== */
|
====================== */
|
||||||
.job-single-img img{
|
.job-single-img img{
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@@ -6772,7 +6772,7 @@ career single css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
blog css
|
blog css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.blog-item {
|
.blog-item {
|
||||||
@@ -7309,7 +7309,7 @@ partner css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
contact us css
|
contact us css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.contact-wrapper {
|
.contact-wrapper {
|
||||||
@@ -7416,7 +7416,7 @@ contact us css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
team css
|
team css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.team-area {
|
.team-area {
|
||||||
@@ -7568,7 +7568,7 @@ team css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
pricing css
|
pricing css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.pricing-item {
|
.pricing-item {
|
||||||
@@ -7636,7 +7636,7 @@ pricing css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
faq css
|
faq css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.faq-area .accordion-item {
|
.faq-area .accordion-item {
|
||||||
@@ -7794,7 +7794,7 @@ breadcrumb css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
pagination css
|
pagination css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.pagination {
|
.pagination {
|
||||||
@@ -7833,7 +7833,7 @@ pagination css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
auth css
|
auth css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
@@ -8019,7 +8019,7 @@ auth css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
user profile css
|
user profile css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.header-account img {
|
.header-account img {
|
||||||
@@ -8895,7 +8895,7 @@ user profile css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
coming soon css
|
coming soon css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.coming-soon {
|
.coming-soon {
|
||||||
@@ -9015,7 +9015,7 @@ coming soon css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
error css
|
error css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.error-wrapper {
|
.error-wrapper {
|
||||||
@@ -9056,7 +9056,7 @@ error css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
terms/privacy css
|
terms/privacy css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.terms-content:not(:last-child) {
|
.terms-content:not(:last-child) {
|
||||||
@@ -9089,7 +9089,7 @@ terms/privacy css
|
|||||||
|
|
||||||
|
|
||||||
/* ===================
|
/* ===================
|
||||||
footer css
|
footer css
|
||||||
====================== */
|
====================== */
|
||||||
|
|
||||||
.footer-area {
|
.footer-area {
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ use Illuminate\Support\Facades\Route;
|
|||||||
|
|
||||||
Route::prefix('auth')->name('auth.')->group(function () {
|
Route::prefix('auth')->name('auth.')->group(function () {
|
||||||
|
|
||||||
|
Route::get('cities/{province}', [RegisterController::class, 'cities'])
|
||||||
|
->name('cities.index');
|
||||||
|
|
||||||
Route::middleware('guest:web')->group(function () {
|
Route::middleware('guest:web')->group(function () {
|
||||||
Route::prefix('register')->name('register.')->controller(RegisterController::class)->group(function () {
|
Route::prefix('register')->name('register.')->controller(RegisterController::class)->group(function () {
|
||||||
Route::get('/', 'index')->name('index');
|
Route::get('/', 'index')->name('index');
|
||||||
|
|||||||
Reference in New Issue
Block a user