git commit "fix user panel pages hero layout and add profile dropdown improvements"
This commit is contained in:
@@ -8,9 +8,9 @@ class CityController extends Controller
|
|||||||
{
|
{
|
||||||
public function byProvince(int $province)
|
public function byProvince(int $province)
|
||||||
{
|
{
|
||||||
$cities = City::where('provinces', $province)
|
$cities = City::where('provinces_id', $province)
|
||||||
->orderBy('name')
|
->orderBy('name')
|
||||||
->get(['id', 'name']);
|
->get();
|
||||||
|
|
||||||
return response()->json($cities);
|
return response()->json($cities);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ class CommentController extends Controller
|
|||||||
->latest()
|
->latest()
|
||||||
->paginate(4);
|
->paginate(4);
|
||||||
|
|
||||||
return view('account.users.comments.index',compact('comments'));
|
return view('account.users.comments.index', [
|
||||||
|
'comments' => $comments,
|
||||||
|
'withoutHero' => true
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(CommentStoreRequest $request)
|
public function store(CommentStoreRequest $request)
|
||||||
|
|||||||
@@ -14,10 +14,11 @@ class FavoriteController extends Controller
|
|||||||
->latest()
|
->latest()
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
return view('account.users.favorite.index', compact('favorites'));
|
return view('account.users.favorite.index', [
|
||||||
|
'favorites' => $favorites,
|
||||||
}
|
'withoutHero' => true
|
||||||
public function store(Request $request)
|
]);
|
||||||
|
} public function store(Request $request)
|
||||||
{
|
{
|
||||||
Favorite::firstOrCreate([
|
Favorite::firstOrCreate([
|
||||||
'user_id' => auth()->id(),
|
'user_id' => auth()->id(),
|
||||||
|
|||||||
@@ -3,33 +3,49 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Flight;
|
use App\Models\Flight;
|
||||||
|
use App\Models\Tour;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class FlightController extends Controller
|
class FlightController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$newestFlight = Flight::
|
$flights = Flight::latest()
|
||||||
latest()
|
->applySearch($request->all())
|
||||||
->applySearch()
|
->paginate(10);
|
||||||
->take(10)
|
|
||||||
|
|
||||||
|
$newestFlight = Flight::latest()
|
||||||
|
->take(3)
|
||||||
->get();
|
->get();
|
||||||
$flights = Flight::latest()->
|
|
||||||
paginate(9);
|
|
||||||
|
|
||||||
return view('home.index', compact('newestFlight', 'flights'));
|
|
||||||
|
$newestTour = Tour::latest()
|
||||||
|
->take(3)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
|
||||||
|
$tours = Tour::latest()
|
||||||
|
->paginate(10);
|
||||||
|
|
||||||
|
|
||||||
|
return view('flights.index', compact(
|
||||||
|
'flights',
|
||||||
|
'newestFlight',
|
||||||
|
'newestTour',
|
||||||
|
'tours'
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
public function show(Flight $flight)
|
||||||
public function show(Flight $flight)
|
|
||||||
{
|
{
|
||||||
$flight->increment('views');
|
$flight->increment('views');
|
||||||
|
|
||||||
$comments = $flight->comments()
|
$comments = $flight->comments()
|
||||||
->latest()
|
->latest()
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
|
||||||
return view('flights.show', compact('flight','comments'));
|
return view('flights.show', compact('flight', 'comments'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,13 +11,12 @@ class HomeController extends Controller
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$newestFlight = Flight::
|
$newestFlight = Flight::
|
||||||
where('departure_date', '>=', now())
|
orderBy('created_at', 'desc')
|
||||||
->orderBy('departure_date', 'asc')
|
->paginate(1);
|
||||||
->take(3)
|
|
||||||
->get();
|
|
||||||
$newestTour = Tour::latest()
|
$newestTour = Tour::latest()
|
||||||
->take(10)
|
->paginate(2);
|
||||||
->get();
|
|
||||||
|
|
||||||
$flights = Flight::latest()
|
$flights = Flight::latest()
|
||||||
->paginate(5);
|
->paginate(5);
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ class ProfileController extends Controller
|
|||||||
$inputs['profile_image'] = $imageName;
|
$inputs['profile_image'] = $imageName;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->update($inputs);
|
$user->update($inputs);
|
||||||
|
|
||||||
return back()->with([
|
return back()->with([
|
||||||
'success','اطلاعات کاربر با موفقیت ویرایش شد.'
|
'success'=>'اطلاعات کاربر با موفقیت ویرایش شد.'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ class TourController extends Controller
|
|||||||
{
|
{
|
||||||
$newestTour = Tour::with('travelType')
|
$newestTour = Tour::with('travelType')
|
||||||
->latest()
|
->latest()
|
||||||
->take(10)
|
->paginate(3);
|
||||||
->get();
|
|
||||||
|
|
||||||
$tours = Tour::with('travelType')
|
$tours = Tour::with('travelType')
|
||||||
->latest()
|
->latest()
|
||||||
->paginate(5);
|
->paginate(2);
|
||||||
|
|
||||||
return view('tours.index', compact('newestTour', 'tours'));
|
return view('tours.index', compact('newestTour', 'tours'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,12 +104,12 @@ class ProfileUpdateRequest extends FormRequest
|
|||||||
|
|
||||||
|
|
||||||
'password' => [
|
'password' => [
|
||||||
'required',
|
'nullable',
|
||||||
'confirmed',
|
'confirmed',
|
||||||
'min:8'
|
'min:8'
|
||||||
],
|
],
|
||||||
'current_password' => [
|
'current_password' => [
|
||||||
'required_with:new_password',
|
'nullable:new_password',
|
||||||
'current_password:web',
|
'current_password:web',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -43,6 +43,6 @@ class City extends Model
|
|||||||
}
|
}
|
||||||
public function province()
|
public function province()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Province::class);
|
return $this->belongsTo(Province::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-10
@@ -81,17 +81,12 @@ class Flight extends Model
|
|||||||
public function applySearch(Builder $query, array $filters): void
|
public function applySearch(Builder $query, array $filters): void
|
||||||
{
|
{
|
||||||
$query
|
$query
|
||||||
->when($filters['origin'] ?? null, function ($query, $origin) {
|
->when($filters['origin'] ?? null, function($query,$origin){
|
||||||
$query->where('origin', $origin);
|
$query->where('origin',$origin);
|
||||||
})
|
})
|
||||||
->when($filters['destination'] ?? null, function ($query, $destination) {
|
|
||||||
$query->where('destination', $destination);
|
->when($filters['destination'] ?? null, function($query,$destination){
|
||||||
})
|
$query->where('destination',$destination);
|
||||||
->when($filters['departure_date'] ?? null, function ($query, $date) {
|
|
||||||
$query->whereDate('departure_date', $date);
|
|
||||||
})
|
|
||||||
->when($filters['passengers'] ?? null, function ($query, $passengers) {
|
|
||||||
$query->where('capacity', '>=', $passengers);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use App\Models\Province;
|
use App\Models\Province;
|
||||||
|
use Illuminate\Pagination\Paginator;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
@@ -26,6 +27,10 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
|
|
||||||
$view->with('provinces', $provinces);
|
$view->with('provinces', $provinces);
|
||||||
|
|
||||||
|
Paginator::useTailwind();
|
||||||
|
Paginator::useBootstrapFive();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,105 +1,65 @@
|
|||||||
@extends('layouts.app')
|
@extends('account.layout.app')
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<div class="container">
|
@section('account-content')
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="profile-box">
|
||||||
|
|
||||||
<div class="panel panel-default">
|
|
||||||
|
|
||||||
<div class="panel-heading">
|
<h3 class="fw-bold">
|
||||||
پنل کاربری
|
سلام {{auth()->user()->name}} 👋
|
||||||
</div>
|
</h3>
|
||||||
|
|
||||||
<div class="panel-body">
|
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<p class="text-muted">
|
||||||
|
از اینجا میتوانید تورها، پروازها و نظرات خود را مدیریت کنید.
|
||||||
|
</p>
|
||||||
|
|
||||||
<li>
|
|
||||||
<a href="{{ route('users.dashboard') }}">
|
|
||||||
داشبورد
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
<div class="row mt-4">
|
||||||
<a href="{{route('users.profile.edit')}}">
|
|
||||||
ویرایش پروفایل
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<a href="{{route('users.favorite.index')}}">
|
|
||||||
علاقهمندیها
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
<div class="col-md-4">
|
||||||
<a href="#">
|
|
||||||
نظرات من
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
<div class="card border-0 shadow-sm rounded-4 p-3">
|
||||||
<a href="{{ route('auth.logout.index') }}">
|
|
||||||
خروج
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
<h5>
|
||||||
|
❤️ علاقه مندی
|
||||||
|
</h5>
|
||||||
|
|
||||||
</div>
|
<strong>
|
||||||
|
{{ auth()->user()->favorites()->count() }}
|
||||||
|
</strong>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-9">
|
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<div class="panel-heading">
|
<div class="card border-0 shadow-sm rounded-4 p-3">
|
||||||
داشبورد
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel-body">
|
<h5>
|
||||||
|
💬 نظرات
|
||||||
|
</h5>
|
||||||
|
|
||||||
<h3>
|
<strong>
|
||||||
سلام {{ $user->first_name }} {{ $user->last_name }} 👋
|
{{ auth()->user()->comments()->count() }}
|
||||||
</h3>
|
</strong>
|
||||||
|
|
||||||
<p>
|
|
||||||
به پنل کاربری خود خوش آمدید.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<strong>نام کاربری:</strong>
|
|
||||||
{{ $user->username }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<strong>ایمیل:</strong>
|
|
||||||
{{ $user->email }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<strong>موبایل:</strong>
|
|
||||||
{{ $user->mobile }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -716,7 +716,7 @@
|
|||||||
.append('<option value="">در حال دریافت شهرها...</option>');
|
.append('<option value="">در حال دریافت شهرها...</option>');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{{ route('users.cities.by.province', ':province') }}"
|
url: "{{ route('users.cities.province', ':province') }}"
|
||||||
.replace(':province', provinceId),
|
.replace(':province', provinceId),
|
||||||
|
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="card border-0 shadow-sm rounded-4 overflow-hidden h-100">
|
<div class="card border-0 shadow-sm rounded-4 overflow-hidden h-100">
|
||||||
|
<form action="{{ route('users.favorite.store') }}" method="POST">
|
||||||
|
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<input type="hidden" name="id" value="{{ $flight->id }}">
|
||||||
|
|
||||||
|
<input type="hidden"
|
||||||
|
name="type"
|
||||||
|
value="App\Models\Flight">
|
||||||
|
|
||||||
|
|
||||||
|
<button class="btn btn-outline-danger">
|
||||||
|
❤️ افزودن به علاقهمندی
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
<div class="flight-image">
|
<div class="flight-image">
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="container py-5">
|
||||||
|
|
||||||
|
<h2 class="mb-4">
|
||||||
|
آرشیو پروازها
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
@foreach($flights as $flight)
|
||||||
|
|
||||||
|
<div class="col-md-4 mb-4">
|
||||||
|
|
||||||
|
<div class="card shadow-sm">
|
||||||
|
|
||||||
|
<img src="{{ asset($flight->image) }}"
|
||||||
|
class="card-img-top"
|
||||||
|
height="200">
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<h5>
|
||||||
|
{{ $flight->airline }}
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{{ $flight->origin }}
|
||||||
|
-
|
||||||
|
{{ $flight->destination }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<strong>
|
||||||
|
{{ number_format($flight->price) }}
|
||||||
|
تومان
|
||||||
|
</strong>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="mt-4">
|
||||||
|
|
||||||
|
{{ $flights->links() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|||||||
@@ -17,8 +17,20 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
|
||||||
|
<a href="{{ route('flights') }}"
|
||||||
|
class="btn btn-primary">
|
||||||
|
مشاهده همه پروازها
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="{{ route('tours.index') }}"
|
||||||
|
class="btn btn-primary">
|
||||||
|
مشاهده همه تورها
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<br><br><br>
|
||||||
<section class="container my-5">
|
<section class="container my-5">
|
||||||
<h3 class="fw-bold mb-4">همه پروازها و تورها</h3>
|
<h3 class="fw-bold mb-4">همه پروازها و تورها</h3>
|
||||||
|
|
||||||
@@ -34,7 +46,6 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
{{ $flights->links() }}
|
{{ $flights->links() }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<link rel="stylesheet" href="{{asset('assets/css/weather-icons.css')}}"/>
|
<link rel="stylesheet" href="{{asset('assets/css/weather-icons.css')}}"/>
|
||||||
<link rel="stylesheet" href="{{asset('assets/css/bootstrap.css')}}"/>
|
<link rel="stylesheet" href="{{asset('assets/css/bootstrap.css')}}"/>
|
||||||
<link rel="stylesheet" href="{{ asset('assets/css/styles.css?v=2') }}">
|
<link rel="stylesheet" href="{{ asset('assets/css/styles.css?v=2') }}">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@includeUnless(isset($withoutHeader),'layouts.header')
|
@includeUnless(isset($withoutHeader),'layouts.header')
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -62,133 +62,37 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<form action="{{ route('users.favorite.index') }}" method="GET">
|
<form action="{{ route('flights') }}" method="GET">
|
||||||
|
|
||||||
|
<select name="origin">
|
||||||
|
<option value="">مبدا</option>
|
||||||
|
|
||||||
|
@foreach($flights as $flight)
|
||||||
|
<option value="{{ $flight->origin }}">
|
||||||
|
{{ $flight->origin }}
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<div class="flight-fields">
|
<select name="destination">
|
||||||
|
<option value="">مقصد</option>
|
||||||
|
|
||||||
|
@foreach($flights as $flight)
|
||||||
|
<option value="{{ $flight->destination }}">
|
||||||
|
{{ $flight->destination }}
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
{{-- مبدا --}}
|
<button type="submit">
|
||||||
<div class="flight-field">
|
جستجو
|
||||||
|
</button>
|
||||||
<label for="origin">
|
|
||||||
مبدا
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<select id="origin_province">
|
|
||||||
<option value="">استان مبدا</option>
|
|
||||||
|
|
||||||
@foreach($provinces as $province)
|
|
||||||
<option value="{{ $province->id }}">
|
|
||||||
{{ $province->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select name="origin" id="origin_city">
|
|
||||||
<option value="">شهر مبدا</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{{-- مقصد --}}
|
|
||||||
<div class="flight-field">
|
|
||||||
|
|
||||||
<label for="destination">
|
|
||||||
مقصد
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<select id="destination_province">
|
|
||||||
<option value="">استان مقصد</option>
|
|
||||||
|
|
||||||
@foreach($provinces as $province)
|
|
||||||
<option value="{{ $province->id }}">
|
|
||||||
{{ $province->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select name="destination" id="destination_city">
|
|
||||||
<option value="">شهر مقصد</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{{-- تاریخ رفت --}}
|
|
||||||
<div class="flight-field">
|
|
||||||
|
|
||||||
<label for="departure_date">
|
|
||||||
تاریخ رفت
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<input
|
|
||||||
type="date"
|
|
||||||
name="departure_date"
|
|
||||||
id="departure_date"
|
|
||||||
>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{{-- تاریخ برگشت --}}
|
|
||||||
<div class="flight-field">
|
|
||||||
|
|
||||||
<label for="return_date">
|
|
||||||
تاریخ برگشت
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<input
|
|
||||||
type="date"
|
|
||||||
name="return_date"
|
|
||||||
id="return_date"
|
|
||||||
>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{{-- تعداد مسافر --}}
|
|
||||||
<div class="flight-field">
|
|
||||||
|
|
||||||
<label for="passengers">
|
|
||||||
تعداد مسافر
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<select
|
|
||||||
name="passengers"
|
|
||||||
id="passengers"
|
|
||||||
>
|
|
||||||
|
|
||||||
@for($i = 1; $i <= 9; $i++)
|
|
||||||
|
|
||||||
<option value="{{ $i }}">
|
|
||||||
{{ $i }} مسافر
|
|
||||||
</option>
|
|
||||||
|
|
||||||
@endfor
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{{-- جستجو --}}
|
|
||||||
<div class="flight-button-wrapper">
|
|
||||||
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
class="flight-search-button"
|
|
||||||
>
|
|
||||||
🔍
|
|
||||||
جستجوی پرواز
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,67 +1,65 @@
|
|||||||
@foreach($tours as $tour)
|
@extends('layouts.app')
|
||||||
|
|
||||||
<div class="swiper-slide tour-card group">
|
@section('content')
|
||||||
|
|
||||||
<a href="{{ route('tours.show', $tour->id) }}" class="tour-card_image-link">
|
<div class="container py-5">
|
||||||
<img
|
|
||||||
class="tour-card_img"
|
<h2 class="mb-4">
|
||||||
src="{{ asset($tour->image) }}" alt="{{ $tour->title }}" >
|
آرشیو تورها
|
||||||
</a>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<div class="tour-card_content">
|
<div class="row">
|
||||||
|
|
||||||
<a href="{{ route('tours.show', $tour->id) }}"
|
@foreach($tours as $tour)
|
||||||
class="tour-card_title">
|
|
||||||
{{ $tour->title }}
|
<div class="col-md-4 mb-4">
|
||||||
</a>
|
|
||||||
|
<div class="card shadow-sm">
|
||||||
|
|
||||||
|
<img src="{{ asset($tour->image) }}"
|
||||||
|
class="card-img-top"
|
||||||
|
height="200">
|
||||||
|
|
||||||
|
|
||||||
<div class="tour-card_destination">
|
<div class="card-body">
|
||||||
<span>📍</span>
|
|
||||||
{{ Str::limit($tour->summary, 60) }}
|
<h5>
|
||||||
</div>
|
{{ $tour->title }}
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
|
||||||
<div class="tour-card_details">
|
<p>
|
||||||
|
{{ $tour->summary }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<strong>
|
||||||
|
{{ number_format($tour->price) }}
|
||||||
|
تومان
|
||||||
|
</strong>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="tour-detail-item">
|
|
||||||
<span>تاریخ حرکت</span>
|
|
||||||
<strong>
|
|
||||||
{{ \Carbon\Carbon::parse($tour->departure_date)->format('Y/m/d') }}
|
|
||||||
</strong>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@endforeach
|
||||||
<div class="tour-detail-item">
|
|
||||||
<span>نوع سفر</span>
|
|
||||||
<strong>
|
|
||||||
{{ $tour->travelType->name ?? '---' }}
|
|
||||||
</strong>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="tour-card_price">
|
|
||||||
|
|
||||||
<span>شروع قیمت از</span>
|
|
||||||
|
|
||||||
<strong>
|
|
||||||
{{ number_format($tour->price) }}
|
|
||||||
<small>تومان</small>
|
|
||||||
</strong>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<a href="{{ route('tours.show', $tour->id) }}"
|
|
||||||
class="tour-card_btn">
|
|
||||||
مشاهده تور
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="mt-4">
|
||||||
|
|
||||||
|
{{ $tours->links() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endforeach
|
@endsection
|
||||||
|
|||||||
Reference in New Issue
Block a user