git add .
git commit "create admin panel layout structure"
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Admin;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class AdminGenerator extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'app:admin-generator';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Command description';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
Admin::create([
|
||||
'first_name' => 'hatame',
|
||||
'last_name' => 'andarza',
|
||||
'username' => 'hatame14',
|
||||
'email' => 'hatame14@gmail.com',
|
||||
'mobile' => '09119533286',
|
||||
'password' => Hash::make('hatame14'),
|
||||
'image' => '',
|
||||
'status' => 'active',
|
||||
]);
|
||||
|
||||
$this->info('hatame created successfully.');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class Dashboard extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class Flight extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class Tour extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class reservation extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class user extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\CommentStoreRequest;
|
||||
use App\Models\Comment;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class CommentController extends Controller
|
||||
{
|
||||
@@ -29,14 +29,7 @@ class CommentController extends Controller
|
||||
$data['user_id'] = auth()->id();
|
||||
$data['status'] = 0;
|
||||
|
||||
Comment::create([
|
||||
'flight_id' => $request->flight_id,
|
||||
'tour_id' => $request->tour_id,
|
||||
'comment' => $request->comment,
|
||||
'rating' => $request->rating,
|
||||
'user_id' => auth()->id(),
|
||||
'status' => 0,
|
||||
]);
|
||||
Comment::create($data);
|
||||
|
||||
return back()->with(
|
||||
'success',
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FlightStoreRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class TourStoreRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ namespace App\Models;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Foundation\Auth\User;
|
||||
|
||||
|
||||
/**
|
||||
* Class Admin
|
||||
@@ -29,7 +31,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Admin extends Model
|
||||
class Admin extends User
|
||||
{
|
||||
protected $table = 'admins';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace App\Models;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class User
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
class ExcelServices
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
class ReportServices
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components\Home;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class LatestFlights extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.home.latest-flights');
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
web:[
|
||||
__DIR__.'/../routes/web.php',
|
||||
__DIR__.'/../routes/auth.php',
|
||||
__DIR__.'/../routes/admin.php',
|
||||
],
|
||||
commands: __DIR__.'/../routes/console.php',
|
||||
health: '/up',
|
||||
|
||||
@@ -40,6 +40,10 @@ return [
|
||||
'driver' => 'session',
|
||||
'provider' => 'users',
|
||||
],
|
||||
'admin' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'admins',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -64,6 +68,10 @@ return [
|
||||
'driver' => 'eloquent',
|
||||
'model' => App\Models\User::class,
|
||||
],
|
||||
'admins' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => \App\Models\Admin::class,
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -49,7 +49,7 @@
|
||||
|
||||
|
||||
<li>
|
||||
<a href="{{route('users.comments.index')}}">
|
||||
<a href="{{route('comments.index')}}">
|
||||
<i class="fa fa-comments"></i>
|
||||
نظرات من
|
||||
</a>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Let all your things have their places; let each part of your business have its time. - Benjamin Franklin -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Simplicity is the essence of happiness. - Cedric Bledsoe -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Happiness is not something readymade. It comes from your own actions. - Dalai Lama -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Happiness is not something readymade. It comes from your own actions. - Dalai Lama -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Let all your things have their places; let each part of your business have its time. - Benjamin Franklin -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Simplicity is the essence of happiness. - Cedric Bledsoe -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Happiness is not something readymade. It comes from your own actions. - Dalai Lama -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Happiness is not something readymade. It comes from your own actions. - Dalai Lama -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Simplicity is the essence of happiness. - Cedric Bledsoe -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Nothing worth having comes easy. - Theodore Roosevelt -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Happiness is not something readymade. It comes from your own actions. - Dalai Lama -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- He who is contented is rich. - Laozi -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- If you do not have a consistent goal in life, you can not live it in a consistent way. - Marcus Aurelius -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Let all your things have their places; let each part of your business have its time. - Benjamin Franklin -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Simplicity is the essence of happiness. - Cedric Bledsoe -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Happiness is not something readymade. It comes from your own actions. - Dalai Lama -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Let all your things have their places; let each part of your business have its time. - Benjamin Franklin -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Simplicity is the essence of happiness. - Cedric Bledsoe -->
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<!-- Happiness is not something readymade. It comes from your own actions. - Dalai Lama -->
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
.flight-detail-image{
|
||||
|
||||
width:42%;
|
||||
min-height:600px;
|
||||
min-height:400px;
|
||||
|
||||
position:relative;
|
||||
|
||||
@@ -528,7 +528,7 @@
|
||||
ثبت نظر درباره این پرواز
|
||||
</h3>
|
||||
|
||||
<form action="{{ route('users.comments.store') }}" method="POST">
|
||||
<form action="{{ route('comments.store') }}" method="POST">
|
||||
|
||||
@csrf
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
|
||||
<!-- index.html 07:26:20 -->
|
||||
<head>
|
||||
<head>
|
||||
<title>@yield('title', 'سامانه آژانس هواپیمایی')</title>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
@@ -40,5 +39,4 @@
|
||||
<script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDYeBBmgAkyAN_QKjAVOiP_kWZ_eQdadeI&callback=initMap&libraries=places"></script>
|
||||
|
||||
</body>
|
||||
<!-- index.html 07:28:39 -->
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
<div class="container header-inner">
|
||||
|
||||
<a href="/" class="logo">
|
||||
✈️ Travelio
|
||||
Travelio
|
||||
</a>
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
</a>
|
||||
|
||||
|
||||
<a href="{{ route('users.comments.index') }}">
|
||||
<a href="{{ route('comments.index') }}">
|
||||
<i class="fa fa-comments"></i>
|
||||
نظرات قبلی
|
||||
</a>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="flight-hero-content">
|
||||
|
||||
<span class="flight-badge">
|
||||
✈️ سفر بعدی شما از اینجا شروع میشود
|
||||
سفر بعدی شما از اینجا شروع میشود
|
||||
</span>
|
||||
|
||||
<h1>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<form action="{{ route('users.comments.store') }}" method="POST">
|
||||
<form action="{{ route('comments.store') }}" method="POST">
|
||||
|
||||
@csrf
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
<div class="d-flex justify-content-between">
|
||||
|
||||
<strong>
|
||||
{{ $comment->user->name }}
|
||||
{{ $comment->user?->name ?? 'کاربر مهمان' }}
|
||||
</strong>
|
||||
|
||||
<small>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
|
||||
+3
-2
@@ -20,6 +20,9 @@ Route::get('/flights', [FlightController::class, 'index'])->name('flights');
|
||||
Route::get('/tours', [TourController::class, 'index'])->name('tours.index');
|
||||
Route::get('/tours/{tour}', [TourController::class, 'show'])->name('tours.show');
|
||||
|
||||
Route::get('/comments',[CommentController::class,'index'])->name('comments.index');
|
||||
Route::post('/comments',[CommentController::class,'store'])->name('comments.store');
|
||||
|
||||
|
||||
Route::prefix('users')->name('users.')->middleware('auth:web')->group(function (){
|
||||
Route::get('/',[DashboardController::class,'index'])->name('dashboard');
|
||||
@@ -33,8 +36,6 @@ Route::prefix('users')->name('users.')->middleware('auth:web')->group(function (
|
||||
|
||||
Route::delete('/favorite/{favorite}',[FavoriteController::class,'destroy'])->name('favorite.destroy');
|
||||
|
||||
Route::get('/comments',[CommentController::class,'index'])->name('comments.index');
|
||||
Route::post('/comments',[CommentController::class,'store'])->name('comments.store');
|
||||
|
||||
Route::get('/cities/{province}', [CityController::class, 'byProvince'])->name('cities.province');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user