Source: src/Controllers/MarketplaceController.php
Overview
No class-level docblock. Add one at the top of the file.
Extends: App\Controllers\BaseController
Public methods
index(): void
GET /market — card grid + filter rail.
rules(): void
GET /market/rules — the community rules for the marketplace.
mine(): void
GET /market/mine — my active + historical listings.
create(): void
GET /market/new — create form.
store(): void
POST /market — create action.
show(string $slug): void
GET /market/{slug} — listing detail.
userListings(string $username): void
GET /market/user/{username} — public list of a user's listings. Default view is their active listings; ?status=sold|any shows history for buyers comparing reputation against what's been sold. Removed listings remain hidden to everyone except the seller themselves + admins, matching Listing::paginate's visibility.
edit(string $slug): void
GET /market/{slug}/edit — edit form, owner or admin only.
update(string $slug): void
POST /market/{slug}/update — update action.
markSold(string $slug): void
POST /market/{slug}/mark-sold — sell ONE unit of this listing. For single-unit listings (quantity=1) this fully closes the listing; for multi-unit it decrements remaining and flips status='sold' when the last unit sells. Each call creates a listing_sales row so feedback can be recorded per transaction.
withdraw(string $slug): void
POST /market/{slug}/withdraw
postReply(string $slug): void
POST /market/{slug}/reply — add a public Q&A reply. Seller sees a notification; reply authors can soft-delete their own.
deleteReply(string $slug, string $replyId): void
POST /market/{slug}/reply/{replyId}/delete — soft-delete a reply. Reply author or admin (role >= 4) only.
watch(string $slug): void
POST /market/{slug}/watch — add to watchlist.
unwatch(string $slug): void
POST /market/{slug}/unwatch — remove from watchlist.
watching(): void
GET /market/watching — listings I'm watching.
relist(string $slug): void
POST /market/{slug}/relist — reset expires_at to +30d, status=active. Only valid when the listing is already expired, and only by the seller.
submitFeedback(string $slug): void
POST /market/{slug}/feedback — leave trade feedback.
Only available after the listing is sold. Seller + the named
buyer each get one row. rating: -1 / 0 / 1.
userFeedback(string $username): void
GET /market/user/{username}/feedback — public feedback page.
Auto-generated from source by bin/sync-class-docs.php on 2026-04-21 09:56 CDT. Re-runs overwrite this thread body.
. __ ____ ___ ____ _ _
/ /_| ___| / _ \___ \(_)___| |__
| '_ \___ \| | | |__) | / __| '_ \
| (_) |__) | |_| / __/| \__ \ | | |
\___/____/ \___/_____|_|___/_| |_|
D2sk - Sysop