firstcommit

This commit is contained in:
2025-08-17 16:23:14 +05:45
commit 76bf4c0a18
2648 changed files with 362795 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
@extends('admin::layouts.master')
@section('title')
Create Destination
@endsection
@section('breadcrumb')
@php
$breadcrumbData = [
[
'title' => 'Destination',
'link' => 'null',
],
[
'title' => 'Dashboard',
'link' => route('dashboard'),
],
[
'title' => 'Destinations',
'link' => null,
],
[
'title' => 'Add Destination',
'link' => null,
],
];
@endphp
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
@endsection
@section('content')
<div class="row">
<div class="col-xxl">
<div class="card mb-4">
<div class="card-header d-flex align-items-center justify-content-between">
<h5 class="mb-0">Add Destination</h5>
</div>
<div class="card-body">
<form action="{{ route('cms.destinations.store') }}" method="POST" enctype="multipart/form-data">
@csrf
@include('destination::partial.form')
</form>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,49 @@
@extends('admin::layouts.master')
@section('title')
Update Destination
@endsection
@section('breadcrumb')
@php
$breadcrumbData = [
[
'title' => 'Destination',
'link' => 'null',
],
[
'title' => 'Dashboard',
'link' => route('dashboard'),
],
[
'title' => 'Destinations',
'link' => null,
],
[
'title' => 'Update Destination',
'link' => null,
],
];
@endphp
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
@endsection
@section('content')
<div class="row">
<div class="col-xxl">
<div class="card mb-4">
<div class="card-header d-flex align-items-center justify-content-between">
<h5 class="mb-0">Update Destination</h5>
</div>
<div class="card-body">
<form action="{{ route('cms.destinations.update', ['uuid' => $destination->uuid]) }}" method="POST"
enctype="multipart/form-data">
@csrf
@method('PUT')
@include('destination::partial.form')
</form>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,133 @@
@extends('admin::layouts.master')
@section('title')
Destination
@endsection
@section('breadcrumb')
@php
$breadcrumbData = [
[
'title' => 'Destination',
'link' => 'null',
],
[
'title' => 'Dashboard',
'link' => route('dashboard'),
],
[
'title' => 'Destinations',
'link' => null,
],
];
@endphp
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
@endsection
@section('content')
<!-- banners List Table -->
<div class="card">
<div class="row">
<div class="col-md-6">
<h4 class="card-header">List of Destination</h4>
</div>
<div class="col-md-6">
<div class="flex-column flex-md-row">
<div class="dt-action-buttons text-end pt-3 px-3">
<div class="dt-buttons btn-group flex-wrap">
<a href="{{ route('cms.destinations.create') }}"
class="btn btn-secondary create-new btn-primary d-none d-sm-inline-block text-white">
<i class="bx bx-plus me-sm-1"></i>
Add New
</a>
</div>
</div>
</div>
</div>
</div>
<div class="card-datatable table-responsive">
<table class="datatables-users table border-top">
<thead class="table-light">
<tr>
<th>S.N</th>
<th>Image</th>
<th>Title</th>
<th>Country</th>
<th>Rating</th>
<th>No of Activities</th>
<th>Ordering</th>
<th>Actions</th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
@foreach ($destinations ?? [] as $destination)
<tr>
<td>
#{{ $loop->iteration }}
</td>
<td>
<img class="object-fit-contain"
src="{{ asset($destination->image_path ? 'storage/uploads/' . $destination->image_path : 'backend/uploads/images/no-Image.jpg') }}"
alt="" srcset="" height="70" width="60">
</td>
<td>
{{ $destination->title }}
</td>
<td>
{{ $destination->country->name }}
</td>
<td>
{{ $destination->rating }}
</td>
<td>
{{ $destination->activities_count }}
</td>
<td>
{{ $destination->ordering }}
</td>
<td>
<div class="dropdown">
<button type="button" class="btn p-0 dropdown-toggle hide-arrow"
data-bs-toggle="dropdown">
<i class="bx bx-dots-vertical-rounded"></i>
</button>
<div class="dropdown-menu">
<a class="dropdown-item"
href="{{ route('cms.destinations.edit', ['uuid' => $destination->uuid]) }}"><i
class="bx bx-edit-alt me-1"></i>
Edit</a>
<form method="POST"
action="{{ route('cms.destinations.delete', ['uuid' => $destination->uuid]) }}"
id="deleteForm_{{ $destination->uuid }}" class="dropdown-item">
@csrf
@method('DELETE')
<button type="submit" class="border-0 bg-transparent deleteBtn"
style="color:inherit"><i class="bx bx-trash me-1"></i> Delete</button>
</form>
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="px-3">
{{ $destinations->links('admin::layouts.partials.pagination') }}
</div>
</div>
@endsection
{{-- style --}}
@push('required-styles')
@include('admin::vendor.dataTables.style')
@endpush
{{-- script --}}
@push('required-scripts')
@include('admin::vendor.dataTables.script')
@endpush

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Destination Module - {{ config('app.name', 'Laravel') }}</title>
<meta name="description" content="{{ $description ?? '' }}">
<meta name="keywords" content="{{ $keywords ?? '' }}">
<meta name="author" content="{{ $author ?? '' }}">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
{{-- Vite CSS --}}
{{-- {{ module_vite('build-destination', 'resources/assets/sass/app.scss') }} --}}
</head>
<body>
@yield('content')
{{-- Vite JS --}}
{{-- {{ module_vite('build-destination', 'resources/assets/js/app.js') }} --}}
</body>

View File

@@ -0,0 +1,109 @@
<div>
<div class="row mb-4">
<div class="card-body">
<div class="d-flex align-items-start align-items-sm-center gap-4">
<img src="{{ asset(!empty($destination->image_path) ? 'storage/uploads/' . $destination->image_path : 'backend/uploads/images/no-Image.jpg') }}"
alt="destination-image input-file" class="d-block rounded show-image" height="100" width="100" />
<div class="button-wrapper">
<label for="upload" class="btn btn-primary me-2 mb-4" tabindex="0">
<span class="d-none d-sm-block">Upload</span>
<i class="bx bx-upload d-block d-sm-none"></i>
<input type="file" id="upload" class="input-file" name="image" hidden
accept="image/png, image/jpeg" />
</label>
<button type="button" class="btn btn-label-secondary image-reset mb-4">
<i class="bx bx-reset d-block d-sm-none"></i>
<span class="d-none d-sm-block">Reset</span>
</button>
<p class="mb-0">Allowed JPG, GIF or PNG. Max size of 3Mb</p>
</div>
</div>
</div>
<hr class="my-0" />
</div>
<div class="row">
<div class="mb-3 col-md-6">
<label class="form-label" for="basic-default-name">Title</label>
<input type="text" class="form-control" name="title"
value="{{ old('title', $destination->title ?? '') }}" placeholder="e.g. 2 Days Italy Road Trip (Couple)"
required />
</div>
<div class="mb-3 col-md-6">
<label class="form-label" for="basic-default-company">Country</label>
<select id="select2Basic" class="select2 form-select form-select-lg" name="country_id"
data-allow-clear="true">
@foreach ($countries ?? [] as $country)
<option value="{{ $country->id }}"
{{ ($destination->country_id ?? '') == $country->id ? 'selected' : '' }}>{{ $country->name }}
</option>
@endforeach
</select>
</div>
</div>
<div class="row">
<div class="mb-3 col-md-6">
<label class="form-label" for="basic-default-company">Ordering</label>
<input class="form-control" type="number" name="ordering"
value="{{ old('ordering', $destination->ordering ?? '') }}" placeholder="e.g. 2" required />
</div>
<div class="mb-3 col-md-6">
<label class="form-label" for="basic-default-company">Rating</label><br>
<span class='rate'>
<input type="radio" id="star5" name="rating" value="5"
{{ old('rating', isset($destination) ? ($destination->rating == 5 ? 'checked' : '') : '') }} />
<label for="star5" title="5">5 stars</label>
<input type="radio" id="star4" name="rating" value="4"
{{ old('rating', isset($destination) ? ($destination->rating == 4 ? 'checked' : '') : '') }} />
<label for="star4" title="4">4 stars</label>
<input type="radio" id="star3" name="rating" value="3"
{{ old('rating', isset($destination) ? ($destination->rating == 3 ? 'checked' : '') : '') }} />
<label for="star3" title="3">3 stars</label>
<input type="radio" id="star2" name="rating" value="2"
{{ old('rating', isset($destination) ? ($destination->rating == 2 ? 'checked' : '') : '') }} />
<label for="star2" title="2">2 stars</label>
<input type="radio" id="star1" name="rating"
{{ old('rating', isset($destination) ? ($destination->rating == 1 ? 'checked' : '') : '') }} />
<label for="star1" title="1">1 star</label>
</span>
</div>
</div>
<div class="row">
<div class="mb-3 col-md-6 all-activities destination-activities"
data-total-activities="{{ json_encode($activities) }}"
data-destination-activities="{{ isset($destination->activities) ? json_encode($destination->activities) : '' }}">
<label class="form-label" for="basic-default-company">Activities List</label>
<input id="TagifyActivityList" name="activities[]" class="form-control" placeholder="select activity"
value="" />
</div>
</div>
<div>
<button type="submit" class="btn btn-primary">
@if (empty($destination))
Save Destination
@else
Update Destination
@endif
</button>
</div>
</div>
@push('required-styles')
@include('admin::vendor.tagify.style')
@include('admin::vendor.select2.style')
@endpush
@push('required-scripts')
@include('admin::vendor.tagify.script')
@include('admin::vendor.select2.script')
@endpush