Extensions:Sales Widget

From Lorekeeper Wiki
Revision as of 03:20, 10 May 2025 by Liwoyadan (talk | contribs) (Adding images...)
Jump to navigation Jump to search
Sales Widget
Description A widget that displays the most recent sales posts.
Author(s) Min
Status Stable
Github extension/sales-widget
LK Version 3.0.0






Displays a widget on the logged-in dashboard that will show the most recently created/updated sales posts. By default the widget displays the two most recent sales posts but can be configured for more or less.

The widget is called with @include('widgets._sales') and can be used elsewhere (i.e. in a sidebar) as long as the $saleses variable (by default in HomeController) is declared on respective pages.

Installation

Pull the branch; resolve any conflicts if necessary. There are no migrations in this extension. If you are looking for the old v2 version from ~2 years back, you can grab it from the ext/sales-widget branch sitting on my repo.

Configuration

To configure how many sales are displayed, in app\Http\Controllers\HomeController.php in the first function in the file edit the '2' in 'saleses' => Sales::visible()->orderBy('id', 'DESC')->take(2)->get(), to however many news you'd like to be displayed. The widget itself can be edited and styled in resources\views\widgets\_sales.blade.php.

Images

Troubleshooting

I can be found in the Lorekeeper server.

See Also

- Extensions:Sales Image