firstcommit
This commit is contained in:
0
Modules/Service/resources/assets/.gitkeep
Normal file
0
Modules/Service/resources/assets/.gitkeep
Normal file
0
Modules/Service/resources/assets/js/app.js
Normal file
0
Modules/Service/resources/assets/js/app.js
Normal file
0
Modules/Service/resources/assets/sass/app.scss
Normal file
0
Modules/Service/resources/assets/sass/app.scss
Normal file
0
Modules/Service/resources/views/.gitkeep
Normal file
0
Modules/Service/resources/views/.gitkeep
Normal file
46
Modules/Service/resources/views/create.blade.php
Normal file
46
Modules/Service/resources/views/create.blade.php
Normal file
@@ -0,0 +1,46 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Create Service
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Service',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Services',
|
||||
'link' => null,
|
||||
],
|
||||
[
|
||||
'title' => 'Add Service',
|
||||
'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 Service</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form
|
||||
action="{{ route('cms.services.store')}}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@include('service::partial.form')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>@endsection
|
48
Modules/Service/resources/views/edit.blade.php
Normal file
48
Modules/Service/resources/views/edit.blade.php
Normal file
@@ -0,0 +1,48 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Update Service
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Service',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Services',
|
||||
'link' => null,
|
||||
],
|
||||
[
|
||||
'title' => 'Update Service',
|
||||
'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 Service</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('cms.services.update', ['uuid' => $service->uuid]) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
@include('service::partial.form')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>@endsection
|
141
Modules/Service/resources/views/index.blade.php
Normal file
141
Modules/Service/resources/views/index.blade.php
Normal file
@@ -0,0 +1,141 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Service
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Service',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Services',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4 class="card-header">List of Service</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.services.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>Title With Image</th>
|
||||
{{-- <th>Title</th> --}}
|
||||
{{-- <th>Homepage Flag</th> --}}
|
||||
<th>Created At</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="table-border-bottom-0">
|
||||
@if(count($services) > 0)
|
||||
@foreach ($services ?? [] as $service)
|
||||
<tr>
|
||||
<td>
|
||||
#{{ $loop->iteration }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex align-items-center me-3">
|
||||
<img src="{{ asset($service->image_path ? $service->fullImage : 'backend/uploads/images/no-Image.jpg') }}"
|
||||
alt="Image" class="rounded me-3" height="40" width="60" style="object-fit: cover">
|
||||
<div class="card-title mb-0 px-3">
|
||||
<h6 class="mb-0">{{ $service->title }}</h6>
|
||||
<small class="text-muted">{{ Str::limit($service->summary, 80) }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{{-- <td>
|
||||
@if (isset($service->homepage_flag) && $service->homepage_flag == 1)
|
||||
<img src="{{ asset('backend/uploads/icons/tick.png') }}" alt="" srcset=""
|
||||
height="20px">
|
||||
@endif
|
||||
</td> --}}
|
||||
<td>
|
||||
{{ $service->created_at->toFormattedDateString() }}
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge bg-label-{{ $service->status == 'active' ? 'success' : 'danger' }}">
|
||||
{{ $service->status }}</span>
|
||||
</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.services.edit', ['uuid' => $service->uuid]) }}"><i
|
||||
class="bx bx-edit-alt me-1"></i>
|
||||
Edit</a>
|
||||
|
||||
|
||||
<form method="POST"
|
||||
action="{{ route('cms.services.delete', ['uuid' => $service->uuid]) }}"
|
||||
id="deleteForm_{{ $service->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
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="7">No record found.</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="px-3">
|
||||
{{ $services->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
|
29
Modules/Service/resources/views/layouts/master.blade.php
Normal file
29
Modules/Service/resources/views/layouts/master.blade.php
Normal 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>Service 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-service', 'resources/assets/sass/app.scss') }} --}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Vite JS --}}
|
||||
{{-- {{ module_vite('build-service', 'resources/assets/js/app.js') }} --}}
|
||||
</body>
|
146
Modules/Service/resources/views/partial/form.blade.php
Normal file
146
Modules/Service/resources/views/partial/form.blade.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">Service Details</h5>
|
||||
<hr class="my-0">
|
||||
<div class="card-body">
|
||||
<div class="row" x-data="generateSlug()" x-init="title = '{{ addslashes(old('title', $service->title ?? '')) }}';">
|
||||
<div class="mb-3 fv-plugins-icon-container">
|
||||
<label class="form-label" for="basic-default-name">Title</label>
|
||||
<input type="text" class="form-control" x-model="title" x-on:input="updateSlug()"
|
||||
name="title" {{-- value="" --}} value="{{ old('title', $service->title ?? '') }}"
|
||||
placeholder="e.g. Software Development" required />
|
||||
@error('title')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-6 fv-plugins-icon-container">
|
||||
<label for="slug" class="form-label">Slug</label>
|
||||
<input class="form-control" type="text" x-model="slug" name="slug" id=""
|
||||
value="{{ old('slug', $service->slug ?? '') }}" placeholder="e.g:service slug" required>
|
||||
@error('slug')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-6">
|
||||
<label for="language" class="form-label">Status</label>
|
||||
<div class="position-relative">
|
||||
<select id="select2Basic language" class="select2 form-select select2-hidden-accessible"
|
||||
data-select2-id="language" tabindex="-1" aria-hidden="true" name="status">
|
||||
<option value="active"
|
||||
{{ old('status', $service->status ?? '') == 'active' ? 'selected' : '' }}>
|
||||
Active</option>
|
||||
<option value="inactive"
|
||||
{{ old('status', $service->status ?? '') == 'inactive' ? 'selected' : '' }}>Inactive
|
||||
</option>
|
||||
</select>
|
||||
@error('status')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-12">
|
||||
<label for="exampleFormControlTextarea1" class="form-label">Summary</label>
|
||||
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3" name="summary"
|
||||
placeholder="e.g:Write Summary here...">{{ old('summary', $service->summary ?? '') }}</textarea>
|
||||
@error('summary')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-12">
|
||||
<label class="form-label" for="basic-default-message">Detail</label>
|
||||
<textarea name="" id="mainTextarea" class="d-none">{{ !empty($service) ? $service->detail : '' }}</textarea>
|
||||
<textarea name="detail" class="form-contro full-editor form-control" id="editorTextarea" rows='5'
|
||||
placeholder="Creating custom software solutions or applications to meet specific business needs."></textarea>
|
||||
@error('detail')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
{{-- If want to add function Add to Homepage for services --}}
|
||||
{{-- <div class="mb-3 col-md-6 fv-plugins-icon-container">
|
||||
<input type="checkbox" id="checkbox" name="homepage_flag" value="1" {{ old('homepage_flag', isset($service) && $service->homepage_flag == 1) ? 'checked' : '' }}>
|
||||
<label class="form-label" for="checkbox">Add To Homepage</label>
|
||||
</div> --}}
|
||||
|
||||
<div class="mt-2">
|
||||
<button type="submit" class="btn btn-primary me-2">
|
||||
{{ !isset($service) ? 'Save Changes' : 'Update Changes' }}</button>
|
||||
<button type="reset" class="btn btn-label-secondary">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Account -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Right sidebar --}}
|
||||
<div class="col-4">
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">Images</h5>
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-start align-items-sm-center gap-4">
|
||||
<img src="{{ asset(!empty($service->image_path) ? $service->fullImage : 'backend/uploads/images/no-Image.jpg') }}"
|
||||
alt="service-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>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">Service Meta Details</h5>
|
||||
<div class="card-body">
|
||||
<div class="mb-3 col-md-12">
|
||||
<label for="exampleFormControlTextarea1" class="form-label">Meta Title</label>
|
||||
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3" name="meta_title">{{ old('meta_title', $service->serviceMeta->meta_title ?? '') }}</textarea>
|
||||
@error('meta_title')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="mb-3 col-md-12">
|
||||
<label for="exampleFormControlTextarea1" class="form-label">Meta Description</label>
|
||||
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3" name="meta_description">{{ old('meta_description', $service->serviceMeta->meta_description ?? '') }}</textarea>
|
||||
@error('meta_description')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="mb-3 col-md-12">
|
||||
<label for="exampleFormControlTextarea1" class="form-label">Meta Keywords</label>
|
||||
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3" name="meta_keywords">{{ old('meta_keywords', $service->serviceMeta->meta_keywords ?? '') }}</textarea>
|
||||
@error('meta_keywords')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('required-styles')
|
||||
@include('admin::vendor.full_editor.style')
|
||||
@include('admin::vendor.select2.style')
|
||||
@endpush
|
||||
|
||||
@push('required-scripts')
|
||||
@include('admin::vendor.textareaContentDisplay.script')
|
||||
@include('admin::vendor.full_editor.script')
|
||||
@include('admin::vendor.select2.script')
|
||||
@endpush
|
Reference in New Issue
Block a user