git add .

git commit  "create admin panel layout with header sidebar and footer"
This commit is contained in:
2026-08-18 09:49:19 +03:30
parent 14684d5537
commit d7bd95f71a
39 changed files with 347 additions and 75 deletions
@@ -0,0 +1,22 @@
<?php
namespace App\Http\Controllers\Admin\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AuthController extends Controller
{
public function login()
{
return view('admin.auth.login');
}
public function loginPost()
{
}
public function logout()
{
}
}
@@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers\Admin\Auth;
use App\Http\Controllers\Controller;
class DashboardController extends Controller
{
//
}
@@ -5,7 +5,7 @@ namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class Tour extends Controller
class FlightController extends Controller
{
//
}
@@ -5,7 +5,7 @@ namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class Dashboard extends Controller
class TourController extends Controller
{
//
}
@@ -5,7 +5,7 @@ namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class Flight extends Controller
class UserController extends Controller
{
//
}
@@ -5,7 +5,7 @@ namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class reservation extends Controller
class reservationController extends Controller
{
//
}
-11
View File
@@ -1,11 +0,0 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class user extends Controller
{
//
}
@@ -8,7 +8,7 @@ use Illuminate\Foundation\Http\FormRequest;
class FlightStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
* Determine if the userController is authorized to make this request.
*/
public function authorize(): bool
{
+1 -1
View File
@@ -8,7 +8,7 @@ use Illuminate\Foundation\Http\FormRequest;
class TourStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
* Determine if the userController is authorized to make this request.
*/
public function authorize(): bool
{
+1 -1
View File
@@ -8,7 +8,7 @@ use Illuminate\Foundation\Http\FormRequest;
class CommentStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
* Determine if the userController is authorized to make this request.
*/
public function authorize(): bool
{
+1 -1
View File
@@ -8,7 +8,7 @@ use Illuminate\Foundation\Http\FormRequest;
class FavoritePostRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
* Determine if the userController is authorized to make this request.
*/
public function authorize(): bool
{
+1 -1
View File
@@ -8,7 +8,7 @@ use Illuminate\Foundation\Http\FormRequest;
class FlightSearchRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
* Determine if the userController is authorized to make this request.
*/
public function authorize(): bool
{
+1 -1
View File
@@ -8,7 +8,7 @@ use Illuminate\Foundation\Http\FormRequest;
class LoginPostRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
* Determine if the userController is authorized to make this request.
*/
public function authorize(): bool
{
+1 -1
View File
@@ -9,7 +9,7 @@ use Illuminate\Validation\Rule;
class ProfileUpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
* Determine if the userController is authorized to make this request.
*/
public function authorize(): bool
{
+1 -1
View File
@@ -9,7 +9,7 @@ use Illuminate\Validation\Rule;
class RegisterPostRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
* Determine if the userController is authorized to make this request.
*/
public function authorize(): bool
{
+1 -1
View File
@@ -23,7 +23,7 @@ use Illuminate\Database\Eloquent\Model;
* @property Carbon|null $updated_at
*
* @property Tour $tour
* @property User $user
* @property User $userController
*
* @package App\Models
*/
+1 -1
View File
@@ -18,7 +18,7 @@ use Carbon\Carbon;
* @property int $favoritable_id
* @property Carbon|null $created_at
*
* @property User $user
* @property User $userController
*
* @package App\Models
*/
+1 -1
View File
@@ -12,7 +12,7 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
/**
* Class Flight
* Class FlightController
*
* @property int $id
* @property string|null $airline
+1 -1
View File
@@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Tour
* Class TourController
*
* @property int $id
* @property string $title
+9 -1
View File
@@ -1,8 +1,11 @@
<?php
use App\Http\Middleware\AdminMiddleware;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Request;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
@@ -15,7 +18,12 @@ return Application::configure(basePath: dirname(__DIR__))
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
$middleware->redirectGuestsTo(fn (Request $request) => route('auth.login.index'));
$middleware->redirectUsersTo(fn (Request $request) => route('admin.dashboard.index'));
$middleware->alias([
'admin' => AdminMiddleware::class,
]);
})
->withExceptions(function (Exceptions $exceptions) {
//
+7 -7
View File
@@ -25,9 +25,9 @@ return [
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| which utilizes session storage plus the Eloquent user provider.
| which utilizes session storage plus the Eloquent userController provider.
|
| All authentication guards have a user provider, which defines how the
| All authentication guards have a userController provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
@@ -51,11 +51,11 @@ return [
| User Providers
|--------------------------------------------------------------------------
|
| All authentication guards have a user provider, which defines how the
| All authentication guards have a userController provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| If you have multiple user tables or models you may configure multiple
| If you have multiple userController tables or models you may configure multiple
| providers to represent the model / table. These providers may then
| be assigned to any extra authentication guards you have defined.
|
@@ -86,14 +86,14 @@ return [
|
| These configuration options specify the behavior of Laravel's password
| reset functionality, including the table utilized for token storage
| and the user provider that is invoked to actually retrieve users.
| and the userController provider that is invoked to actually retrieve users.
|
| The expiry time is the number of minutes that each reset token will be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
| The throttle setting is the number of seconds a user must wait before
| generating more password reset tokens. This prevents the user from
| The throttle setting is the number of seconds a userController must wait before
| generating more password reset tokens. This prevents the userController from
| quickly generating a very large amount of password reset tokens.
|
*/
+9 -9
View File
@@ -353,23 +353,23 @@ return [
| How the relations should be named in your models.
|
| 'related' Use the related table as the relation name.
| (post.author --> user.id)
generates Post::user() and User::posts()
| (post.author --> userController.id)
generates Post::userController() and User::posts()
|
| 'foreign_key' Use the foreign key as the relation name.
| This can help to provide more meaningful relationship names, and avoids naming conflicts
| if you have more than one relationship between two tables.
| (post.author_id --> user.id)
| (post.author_id --> userController.id)
| generates Post::author() and User::posts_where_author()
| (post.editor_id --> user.id)
| (post.editor_id --> userController.id)
| generates Post::editor() and User::posts_where_editor()
| ID suffixes can be omitted from foreign keys.
| (post.author --> user.id)
| (post.editor --> user.id)
| (post.author --> userController.id)
| (post.editor --> userController.id)
| generates the same as above.
| Where the foreign key matches the related table name, it behaves as per the 'related' strategy.
| (post.user_id --> user.id)
| generates Post::user() and User::posts()
| (post.user_id --> userController.id)
| generates Post::userController() and User::posts()
*/
'relation_name_strategy' => 'related',
@@ -486,7 +486,7 @@ return [
// 'except' => ['migrations'],
// 'only' => ['users'],
// // Table Specifics Bellow:
// 'user' => [
// 'userController' => [
// // Don't use any default trait
// 'use' => [],
// ]
+8 -8
View File
@@ -141,9 +141,9 @@ CREATE TABLE IF NOT EXISTS `favorites` (
--
INSERT INTO `favorites` (`id`, `user_id`, `favoritable_type`, `favoritable_id`, `created_at`) VALUES
(1, 4, 'App\\Models\\Tour', 2, '2026-08-17 10:11:01'),
(2, 4, 'App\\Models\\Tour', 3, '2026-08-17 10:46:14'),
(3, 4, 'App\\Models\\Tour', 1, '2026-08-17 10:48:29');
(1, 4, 'App\\Models\\TourController', 2, '2026-08-17 10:11:01'),
(2, 4, 'App\\Models\\TourController', 3, '2026-08-17 10:46:14'),
(3, 4, 'App\\Models\\TourController', 1, '2026-08-17 10:48:29');
-- --------------------------------------------------------
@@ -269,11 +269,11 @@ CREATE TABLE IF NOT EXISTS `reservations` (
--
INSERT INTO `reservations` (`id`, `user_id`, `reservable_id`, `reservable_type`, `price`, `status`, `created_at`, `updated_at`) VALUES
(1, 4, 2, 'App\\Models\\Tour', 4500000, 'pending', '2026-08-17 15:45:04', '2026-08-17 15:45:04'),
(2, 4, 2, 'App\\Models\\Tour', 4500000, 'pending', '2026-08-17 15:45:08', '2026-08-17 15:45:08'),
(3, 4, 2, 'App\\Models\\Tour', 4500000, 'pending', '2026-08-17 15:45:50', '2026-08-17 15:45:50'),
(4, 4, 2, 'App\\Models\\Tour', 4500000, 'pending', '2026-08-17 15:50:47', '2026-08-17 15:50:47'),
(5, 4, 2, 'App\\Models\\Flight', 12000000, 'pending', '2026-08-17 15:56:38', '2026-08-17 15:56:38');
(1, 4, 2, 'App\\Models\\TourController', 4500000, 'pending', '2026-08-17 15:45:04', '2026-08-17 15:45:04'),
(2, 4, 2, 'App\\Models\\TourController', 4500000, 'pending', '2026-08-17 15:45:08', '2026-08-17 15:45:08'),
(3, 4, 2, 'App\\Models\\TourController', 4500000, 'pending', '2026-08-17 15:45:50', '2026-08-17 15:45:50'),
(4, 4, 2, 'App\\Models\\TourController', 4500000, 'pending', '2026-08-17 15:50:47', '2026-08-17 15:50:47'),
(5, 4, 2, 'App\\Models\\FlightController', 12000000, 'pending', '2026-08-17 15:56:38', '2026-08-17 15:56:38');
-- --------------------------------------------------------
+1 -1
View File
@@ -8,7 +8,7 @@ return [
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| messages that we need to display to the userController. You are free to modify
| these language lines according to your application's requirements.
|
*/
+1 -1
View File
@@ -17,6 +17,6 @@ return [
'sent' => 'We have emailed your password reset link.',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that email address.",
'userController' => "We can't find a userController with that email address.",
];
+1 -1
View File
@@ -8,7 +8,7 @@ return [
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| messages that we need to display to the userController. You are free to modify
| these language lines according to your application's requirements.
|
*/
+1 -1
View File
@@ -17,6 +17,6 @@ return [
'sent' => 'ایمیلی جهت بازیابی رمزعبور برای شما ارسال شد',
'throttled' => 'لطفا اندکی صبر کنید و دوباره امتحان کنید',
'token' => 'مشخصه بازیابی رمزعبور شما صحیح نمی باشد',
'user' => "کاربری با این اطلاعات وجود ندارد",
'userController' => "کاربری با این اطلاعات وجود ندارد",
];
+2 -2
View File
@@ -2720,7 +2720,7 @@
this._pages = [];
/**
* All DOM elements of the user interface.
* All DOM elements of the userController interface.
* @protected
* @type {Object}
*/
@@ -2938,7 +2938,7 @@
};
/**
* Draws the user interface.
* Draws the userController interface.
* @todo The option `dotsData` wont work.
* @protected
*/
+5 -5
View File
@@ -84,7 +84,7 @@
};
/**
* Check to see if user prefers reduced motion
* Check to see if userController prefers reduced motion
* @param {Object} settings Script settings
*/
var reduceMotion = function (settings) {
@@ -389,7 +389,7 @@
smoothScroll.animateScroll = function (anchor, toggle, options) {
// Local settings
var animateSettings = extend(settings || defaults, options || {}); // Merge user options with defaults
var animateSettings = extend(settings || defaults, options || {}); // Merge userController options with defaults
// Selectors and variables
var isNum = Object.prototype.toString.call(anchor) === '[object Number]' ? true : false;
@@ -483,7 +483,7 @@
*/
var clickHandler = function (event) {
// Don't run if the user prefers reduced motion
// Don't run if the userController prefers reduced motion
if (reduceMotion(settings)) return;
// Don't run if right-click or command/control + click
@@ -586,7 +586,7 @@
smoothScroll.destroy();
// Selectors and variables
settings = extend(defaults, options || {}); // Merge user options with defaults
settings = extend(defaults, options || {}); // Merge userController options with defaults
fixedHeader = settings.header ? document.querySelector(settings.header) : null; // Get the fixed header
headerHeight = getHeaderHeight(fixedHeader);
@@ -623,4 +623,4 @@
return SmoothScroll;
});
});
+7 -7
View File
@@ -120,8 +120,8 @@
} else {
element = this.$menu.insertAfter(this.$element);
this.hasSameParent = true;
}
}
if (!this.hasSameParent) {
// We cannot rely on the element position, need to position relative to the window
element.css("position", "fixed");
@@ -143,7 +143,7 @@
if (this.options.fitToElement === true) {
element.css("width", this.$element.outerWidth() + "px");
}
this.shown = true;
return this;
},
@@ -168,7 +168,7 @@
var worker = $.proxy(function () {
// Bloodhound (since 0.11) needs three arguments.
// Bloodhound (since 0.11) needs three arguments.
// Two of them are callback functions (sync and async) for local and remote data processing
// see https://github.com/twitter/typeahead.js/blob/master/src/bloodhound/bloodhound.js#L132
if ($.isFunction(this.source) && this.source.length === 3) {
@@ -489,7 +489,7 @@
this.keyPressed = false;
if (this.options.showHintOnFocus && this.skipShowHintOnFocus !== true) {
if(this.options.showHintOnFocus === "all") {
this.lookup("");
this.lookup("");
} else {
this.lookup();
}
@@ -506,12 +506,12 @@
this.focused = false;
this.keyPressed = false;
} else if (this.mouseddown) {
// This is for IE that blurs the input when user clicks on scroll.
// This is for IE that blurs the input when userController clicks on scroll.
// We set the focus back on the input and prevent the lookup to occur again
this.skipShowHintOnFocus = true;
this.$element.focus();
this.mouseddown = false;
}
}
},
click: function (e) {
Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@@ -0,0 +1,3 @@
<div>
<!-- Smile, breathe, and go slowly. - Thich Nhat Hanh -->
</div>
+21 -3
View File
@@ -1,3 +1,21 @@
<div>
<!-- Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead -->
</div>
@extends('admin.layouts.app')
@section('title','داشبورد')
@section('content')
<div class="card shadow">
<div class="card-body">
<h3>
خوش آمدید به پنل مدیریت
</h3>
</div>
</div>
@endsection
+49 -2
View File
@@ -1,3 +1,50 @@
<div>
<!-- Happiness is not something readymade. It comes from your own actions. - Dalai Lama -->
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
@yield('title', 'پنل مدیریت')
</title>
<link href="{{asset('assets/css/bootstrap.css')}}" rel="stylesheet">
</head>
<body>
<div class="d-flex">
@include('admin.layouts.sidebar')
<div class="flex-grow-1">
@include('admin.layouts.header')
<main class="p-4">
@yield('content')
</main>
@include('admin.layouts.footer')
</div>
</div>
</body>
</html>
@@ -0,0 +1,7 @@
<footer class="bg-light text-center py-2 border-top">
<small class="text-muted">
© {{ date('Y') }} پنل مدیریت آژانس هواپیمایی | تمامی حقوق محفوظ است
</small>
</footer>
@@ -0,0 +1,26 @@
<nav class="navbar navbar-light bg-light px-4 shadow-sm">
<span class="navbar-brand">
داشبورد مدیریت
</span>
<div>
<span class="me-3">
مدیر
</span>
<a href="#"
class="btn btn-danger btn-sm">
خروج
</a>
</div>
</nav>
@@ -0,0 +1,64 @@
<div class="bg-dark text-white p-3"
style="width:250px; min-height:100vh;">
<h4 class="text-center mb-4">
پنل مدیریت
</h4>
<ul class="nav flex-column">
<li class="nav-item mb-2">
<a href="{{ route('admin.dashboard.index') }}"
class="nav-link text-white">
داشبورد
</a>
</li>
<li class="nav-item mb-2">
<a href="{{ route('admin.tours.index') }}"
class="nav-link text-white">
مدیریت تورها
</a>
</li>
<li class="nav-item mb-2">
<a href="{{ route('admin.flights.index') }}"
class="nav-link text-white">
مدیریت پروازها
</a>
</li>
<li class="nav-item mb-2">
<a href="{{ route('admin.users.index') }}"
class="nav-link text-white">
کاربران
</a>
</li>
</ul>
</div>
+78
View File
@@ -1,3 +1,81 @@
<?php
use App\Http\Controllers\Admin\Auth\AuthController;
use App\Http\Controllers\Admin\Auth\DashboardController;
use App\Http\Controllers\Admin\UserController;
use App\Http\Controllers\FlightController;
use App\Http\Controllers\TourController;
use Illuminate\Support\Facades\Route;
Route::prefix('admin')->name('admin.')->group(function (){
Route::get('/' ,function (){
return redirect()->route('');
})->name('index');
Route::prefix('auth')->name('auth.')->controller(AuthController::class)->group(function (){
Route::prefix('login')->name('login.')->middleware('guest:admin')->group(function (){
Route::get('/','login')->name('index');
Route::post('/','loginPost')->name('post');
});
Route::get('logout','logout')->middleware('auth:admin')
->name('logout');
});
Route::middleware('auth:admin')->group(function (){
Route::get('dashboard',[DashboardController::class ,'index'])->name('dashboard.index');
Route::prefix('tours')->name('tours.')->controller(TourController::class)->group(function (){
Route::get('/','index')->name('index');
Route::prefix('{tour}')->group(function (){
Route::get('show','show')->name('show');
Route::get('edit','edit')->name('edit');
Route::put('update','update')->name('update');
Route::delete('destroy','destroy')->name('destroy');
});
});
Route::prefix('flights')->name('flights.')->controller(FlightController::class)->group(function (){
Route::get('/','index')->name('index');
Route::prefix('{flight}')->group(function (){
Route::get('show','show')->name('show');
Route::get('edit','edit')->name('edit');
Route::put('update','update')->name('update');
Route::delete('destroy','destroy')->name('destroy');
});
});
Route::prefix('users')
->name('users.')
->controller(UserController::class)
->group(function (){
Route::get('/','index')->name('index');
Route::prefix('{user}')->group(function (){
Route::get('show','show')->name('show');
Route::get('edit','edit')->name('edit');
Route::put('update','update')->name('update');
Route::delete('destroy','destroy')->name('destroy');
});
});
});
});