diff --git a/app/Http/Controllers/RateCardController.php b/app/Http/Controllers/RateCardController.php
index 4b899fd..fad71d8 100644
--- a/app/Http/Controllers/RateCardController.php
+++ b/app/Http/Controllers/RateCardController.php
@@ -103,7 +103,8 @@ class RateCardController extends Controller
public function profilePage(): View
{
$profile = RateCardProfile::getSingleton();
- return view('rate-cards.profile', compact('profile'));
+ $mediaFiles = \App\Models\MediaFile::latest()->get();
+ return view('rate-cards.profile', compact('profile', 'mediaFiles'));
}
public function profileUpdate(Request $request): RedirectResponse
@@ -125,6 +126,11 @@ class RateCardController extends Controller
'brand_logo_size' => 'nullable|in:small,medium,large',
'contact_person_html' => 'nullable|string',
'logo' => 'nullable|image|max:2048',
+ 'content_showcase' => 'nullable|array',
+ 'content_showcase.*.file_id' => 'required_with:content_showcase|string',
+ 'content_showcase.*.name' => 'required_with:content_showcase|string|max:255',
+ 'content_showcase.*.url' => 'nullable|url',
+ 'content_showcase.*.thumbnail_path' => 'nullable|string',
]);
$profile = RateCardProfile::getSingleton();
@@ -135,6 +141,7 @@ class RateCardController extends Controller
}
$validated['show_prices'] = $request->has('show_prices');
+ $validated['content_showcase'] = $request->input('content_showcase', []);
unset($validated['logo']);
$profile->update($validated);
@@ -221,6 +228,17 @@ class RateCardController extends Controller
// ── PDF Download ─────────────────────────────────────────────
+ public function uploadShowcaseThumbnail(Request $request)
+ {
+ $request->validate(['thumbnail' => 'required|image|max:2048']);
+ $path = $request->file('thumbnail')->store('showcase', 'public');
+
+ return response()->json([
+ 'path' => $path,
+ 'url' => asset('storage/' . $path)
+ ]);
+ }
+
public function pdf(): \Illuminate\Http\Response
{
$profile = RateCardProfile::getSingleton();
diff --git a/app/Models/RateCardProfile.php b/app/Models/RateCardProfile.php
index 0d82120..1e368ae 100644
--- a/app/Models/RateCardProfile.php
+++ b/app/Models/RateCardProfile.php
@@ -17,11 +17,13 @@ class RateCardProfile extends Model
'past_brands',
'brand_logo_size',
'contact_person_html',
+ 'content_showcase',
];
protected $casts = [
'show_prices' => 'boolean',
'past_brands' => 'array',
+ 'content_showcase' => 'array',
];
/** Get the singleton profile, creating defaults if needed */
diff --git a/database/migrations/2026_04_05_155627_add_content_showcase_to_rate_card_profiles_table.php b/database/migrations/2026_04_05_155627_add_content_showcase_to_rate_card_profiles_table.php
new file mode 100644
index 0000000..248fc88
--- /dev/null
+++ b/database/migrations/2026_04_05_155627_add_content_showcase_to_rate_card_profiles_table.php
@@ -0,0 +1,22 @@
+json('content_showcase')->nullable();
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::table('rate_card_profiles', function (Blueprint $table) {
+ $table->dropColumn('content_showcase');
+ });
+ }
+};
diff --git a/resources/views/rate-cards/pdf.blade.php b/resources/views/rate-cards/pdf.blade.php
index f7bf8a3..688bad5 100644
--- a/resources/views/rate-cards/pdf.blade.php
+++ b/resources/views/rate-cards/pdf.blade.php
@@ -299,6 +299,52 @@
@endif
+ @if(!empty($profile->content_showcase))
+
+
+ @endif
+
@if($profile->terms_and_conditions)
diff --git a/resources/views/rate-cards/profile.blade.php b/resources/views/rate-cards/profile.blade.php
index eaf4200..1ba7818 100644
--- a/resources/views/rate-cards/profile.blade.php
+++ b/resources/views/rate-cards/profile.blade.php
@@ -84,52 +84,52 @@
+ async removeLogo() {
+ if (!confirm('Remove this logo?')) return;
+ const fd = new FormData();
+ fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
+ fd.append('_method', 'DELETE');
+ await fetch('{{ route('rate-cards.profile.delete-logo', [], false) }}', {
+ method: 'POST',
+ body: fd,
+ headers: { 'Accept': 'application/json' }
+ });
+ this.logoUrl = '';
+ }
+ }">
@@ -149,9 +149,9 @@
+ file:mr-3 file:py-2 file:px-4 file:rounded-full file:border-0
+ file:text-xs file:font-semibold file:bg-pink-50 file:text-pink-600
+ hover:file:bg-pink-100 cursor-pointer" :disabled="uploading">
Uploading…
@@ -190,25 +190,25 @@
+ }">
@@ -219,41 +219,41 @@
+ }">
@php
$defaultContactHtml = '
-
CONTACT PERSON
';
+
CONTACT PERSON
';
if ($profile->whatsapp) {
$defaultContactHtml .= '
' . $profile->whatsapp . '
-
(WHATS APP)
';
+
(WHATS APP)
';
}
if ($profile->email) {
$defaultContactHtml .= '
EMAIL
-
' . strtoupper($profile->email) . '
';
+
' . strtoupper($profile->email) . '
';
}
$defaultContactHtml .= '
- Kami tidak bertanggung jawab atas segala bentuk kerjasama yg timbul dengan pihak selain dari kontak diatas
-
-
';
+ Kami tidak bertanggung jawab atas segala bentuk kerjasama yg timbul dengan pihak selain dari kontak diatas
+
+ ';
@endphp
@@ -282,93 +282,218 @@
- {{-- Past Brands --}}
-
-
-
-
Brand Collaborations Logo
-
-
-
-
-
-
Display Size on PDF:
-
+ {{-- Past Brands --}}
+
+
+
+
Brand Collaborations Logo
+
+
+
+
+
+ Display Size on
+ PDF:
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
Upload brand logos you've worked with. They will be displayed on
+ your rate
+ cards.
-
-
-
-
![]()
-
-
-
-
+ {{-- Content Showcase --}}
+
+
+ 📺
+
Content Showcase
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Uploaded Thumbnail: Use this to override the default display icon for videos and documents.
+
+
+
+
+
+
+
+
+
Select files you've uploaded in the Files page to feature them
+ directly on your public rate card.
+
-
Upload brand logos you've worked with. They will be displayed on your rate
- cards.
-
-
- {{-- Actions --}}
-
-
+ {{-- Actions --}}
+
+
@endsection
\ No newline at end of file
diff --git a/resources/views/rate-cards/public.blade.php b/resources/views/rate-cards/public.blade.php
index b1e5f39..fc9045f 100644
--- a/resources/views/rate-cards/public.blade.php
+++ b/resources/views/rate-cards/public.blade.php
@@ -6,6 +6,7 @@
Rate Card — {{ $profile->owner_name }}
+
-
+
@endif
+ @if(!empty($profile->content_showcase))
+
+ @endif
+
@if($profile->terms_and_conditions)
@@ -341,6 +399,13 @@
+
+
+
+
+
![]()
+
+
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index e39fa04..293bb15 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -88,6 +88,7 @@ Route::post('/rate-cards/profile/logo', [RateCardController::class, 'uploadLogo'
Route::delete('/rate-cards/profile/logo', [RateCardController::class, 'deleteLogo'])->name('rate-cards.profile.delete-logo');
Route::post('/rate-cards/profile/brand-logo', [RateCardController::class, 'uploadBrandLogo'])->name('rate-cards.profile.upload-brand-logo');
Route::delete('/rate-cards/profile/brand-logo', [RateCardController::class, 'deleteBrandLogo'])->name('rate-cards.profile.delete-brand-logo');
+Route::post('/rate-cards/profile/content-thumbnail', [RateCardController::class, 'uploadShowcaseThumbnail'])->name('rate-cards.profile.upload-showcase-thumbnail');
Route::get('/files/profile-logo', [RateCardController::class, 'serveProfileLogo'])->name('files.serve-profile-logo');
Route::resource('rate-cards', RateCardController::class)->except(['show']);