Skip to content

Commit 0dff7f5

Browse files
committed
fix: app name, order purchasable, and section title, books
1 parent d91315c commit 0dff7f5

22 files changed

+278
-275
lines changed

app/Http/Controllers/Backend/OrderController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class OrderController extends Controller
1616
{
1717
public function index(Request $request)
1818
{
19-
$payments = Purchase::where('approved', $request->status)->with('user')->latest('updated_at')->latest()->paginate(paginateCount());
19+
$payments = Purchase::where('approved', $request->status)->has('purchasable')->with('user')->latest('updated_at')->latest()->paginate(paginateCount());
2020
return view('backend.payment.approved', compact('payments'));
2121
}
2222

app/Http/Controllers/Backend/Settings/SettingController.php

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public function store(Request $request)
6262
'whatsapp' => 'required|string',
6363
'favicon' => 'image|max:1024',
6464
'address' => 'required|string',
65+
'app_name' => 'required|string|max:255',
6566
]);
6667
$logo = $request->has('logo') ? saveImage($request->logo, 'settings', 'logo') : $this->setting->basic->logo;
6768
$favicon = $request->has('favicon') ? saveImage($request->favicon, 'settings', 'favicon') : $this->setting->basic->favicon;
@@ -72,6 +73,7 @@ public function store(Request $request)
7273
'phone' => $request->phone,
7374
'whatsapp' => $request->whatsapp,
7475
'address' => $request->address,
76+
'app_name' => $request->app_name,
7577
];
7678
if ($this->setting) {
7779
$this->setting->basic = $array;

app/Http/Controllers/Frontend/HomeController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public function index()
2727
// $products = Product::mappedProducts(['product_category_id' => 1]);
2828
$banners = Banner::latest()->take(6)->latest()->get();
2929
$reviews = Testimonial::latest()->get();
30-
$infos1 = Info::where(['section_id' => 1, 'page_name' => 'homepage'])->latest()->take(4)->latest()->get();
31-
$infos2 = Info::where(['section_id' => 2, 'page_name' => 'homepage'])->latest()->take(4)->latest()->get();
30+
$infos1 = Info::where(['section_id' => 1, 'page_name' => 'homepage'])->latest()->get();
31+
$infos2 = Info::where(['section_id' => 2, 'page_name' => 'homepage'])->latest()->get();
3232
$achievements = Achievement::latest()->take(12)->latest()->get();
3333
$customServices = CustomService::with('image')->where('page_name', PageName::Home)->latest()->get();
3434
return view(

app/Http/Controllers/Frontend/Page/PageController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public function industriesPage()
3434
$achievements = Achievement::latest()->latest()->get();
3535
$partners = PartnerSection::latest()->limit(10)->latest()->get();
3636
$customServices = CustomService::with('image')->where('page_name', PageName::Account)->latest()->get();
37-
$infos1 = Info::where(['section_id' => 1, 'page_name' => 'account'])->latest()->take(4)->latest()->get();
38-
$infos2 = Info::where(['section_id' => 2, 'page_name' => 'account'])->latest()->take(4)->latest()->get();
37+
$infos1 = Info::where(['section_id' => 1, 'page_name' => 'account'])->latest()->get();
38+
$infos2 = Info::where(['section_id' => 2, 'page_name' => 'account'])->latest()->get();
3939
return view('frontend.pages.industries.industries', compact('subCategories', 'achievements', 'partners', 'customServices', 'infos1', 'infos2'));
4040
}
4141
public function clientStudioPage()

app/Http/Requests/StoreInfoRequest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function rules(): array
2424
return [
2525
'section' => 'required',
2626
'title' => 'required|max:100',
27-
'description' => 'required|max:200',
27+
'description' => 'required|string',
2828
'info_image' => 'required|max:5120|image',
2929
'page_name' => 'required|string'
3030
];

app/Http/Requests/UpdateInfoRequest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function rules(): array
2424
return [
2525
'section' => 'required',
2626
'title' => 'required|max:100',
27-
'description' => 'required|max:200',
27+
'description' => 'required|string',
2828
'page_name' => 'required|string'
2929

3030
];

app/Providers/SingletonQueryProvider.php

+11-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Models\Course;
66
use App\Enums\PageName;
7+
use App\Models\BookCategory;
78
use App\Models\Setting;
89
use App\Models\CustomService;
910
use App\Models\ServiceCategory;
@@ -15,20 +16,28 @@ class SingletonQueryProvider extends ServiceProvider
1516
/**
1617
* Register services.
1718
*/
18-
public function register() : void
19+
public function register(): void
1920
{
2021
//
2122
}
2223

2324
/**
2425
* Bootstrap services.
2526
*/
26-
public function boot() : void
27+
public function boot(): void
2728
{
2829
$this->app->singleton('setting', fn (Application $app) => Setting::first());
2930
$this->app->singleton('categories', fn (Application $app) => ServiceCategory::with(['serviceSubCategories', 'serviceSubCategories.services'])->get());
31+
$this->app->singleton('bookCategories', fn (Application $app) => BookCategory::get());
3032
$this->app->singleton('courses', fn (Application $app) => Course::get(['id', 'name']));
3133
$this->app->singleton('customServices', fn (Application $app) => CustomService::with('image')->where('page_name', PageName::Home->value)->get());
3234
$this->app->singleton('customServicesAccount', fn (Application $app) => CustomService::with('image')->where('page_name', PageName::Account->value)->get());
35+
36+
if (app('setting')->basic?->app_name ?? false) {
37+
config([
38+
'app.name' => app('setting')->basic?->app_name,
39+
'mail.from.name'=> app('setting')->basic?->app_name,
40+
]);
41+
}
3342
}
3443
}

resources/views/backend/book/edit-book.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
<div class="col-md-12">
5454
<label for="book_desc">Book Description</label>
55-
<textarea required type="text" name="book_desc" class="form-control" rows="4">+{{ $book->description }}</textarea>
55+
<textarea required type="text" name="book_desc" class="form-control" rows="4">{{ $book->description }}</textarea>
5656
</div>
5757

5858

resources/views/backend/info/createInfo.blade.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
<input type="hidden" name="old_title">
3535

3636
<div class="mt-1">
37-
<label for="desc" class="form-label">Description</label>
38-
<textarea id="desc" class="form-control" name="description" id="description" placeholder="Description"></textarea>
37+
<x-form.ck-editor id="desc" class="form-control" name="description" id="description" placeholder="Description" required></x-form.ck-editor>
3938
</div>
4039

4140

resources/views/backend/info/editInfo.blade.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
</x-backend.form.select-input>
4444

4545
<div class="mt-1">
46-
<label for="desc" class="form-label">Description</label>
47-
<textarea id="desc" class="form-control" name="description" id="description" placeholder="Description">{{ $info->description }}</textarea>
46+
<x-form.ck-editor id="desc" class="form-control" name="description" id="description" placeholder="Description" required>{!! $info->description !!}</x-form.ck-editor>
4847
</div>
4948

5049

resources/views/backend/info/viewInfo.blade.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@
4343
alt="{{ $info->title }}" width="80px" loading="lazy"></td>
4444
<td>{{ Str::limit($info->title, 20, '...') }}</td>
4545
<td>{{ $info->section_id === 1 ? 'Section 1' : 'Section 2' }}</td>
46-
<td>{!! Str::limit($info->description, 40, '...') !!}</td>
46+
<td style="width:250px;
47+
white-space: normal;
48+
overflow-wrap: break-word!important;
49+
word-wrap: break-word!important;
50+
word-break: break-word!important;">{!! $info->description !!}</td>
4751
@can('manage info section')
4852
<td>
4953
<x-backend.ui.button type="edit" href="{{ route('info.edit', $info) }}"

resources/views/backend/layouts/head.blade.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<head>
22

33
<meta charset="utf-8" />
4-
<meta name="csrf-token" content="{{ csrf_token() }}" />
5-
<title>{{ env('APP_NAME') }}</title>
64
<meta name="csrf-token" content="{{ csrf_token() }}">
75
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8-
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
9-
<meta content="Coderthemes" name="author" />
6+
<meta content="Fill tax with ease & comfort" name="description" />
7+
<meta content="{{ config('app.name') }}" name="author" />
108
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
119
<link rel="stylesheet" href="{{ asset('libs/tail.select.js-1.0.2/css/tail.select.css') }}">
10+
<title>{{ config('app.name') }}</title>
1211
<style>
1312
.tail-select {
1413
width: 100% !important;

0 commit comments

Comments
 (0)