fix:changes auth blade and controllers

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