Difference between revisions of "Extensions:Sales Widget"

From Lorekeeper Wiki
Jump to navigation Jump to search
m (Adding images...)
Tag: 2017 source edit
m (Spacing)
Tag: 2017 source edit
 
Line 4: Line 4:
 
The widget is called with <code>@include('widgets._sales')</code> and can be used elsewhere (i.e. in a sidebar) as long as the <code>$saleses</code> variable (by default in HomeController) is declared on respective pages.
 
The widget is called with <code>@include('widgets._sales')</code> and can be used elsewhere (i.e. in a sidebar) as long as the <code>$saleses</code> variable (by default in HomeController) is declared on respective pages.
 
== Installation ==
 
== Installation ==
Pull the branch; resolve any conflicts if necessary.
+
Pull the branch; resolve any conflicts if necessary. There are no migrations in this extension.
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 [https://github.com/liwoyadan/lorekeeper/tree/ext/sales-widget the ext/sales-widget branch sitting on my repo].
 
If you are looking for the old v2 version from ~2 years back, you can grab it from [https://github.com/liwoyadan/lorekeeper/tree/ext/sales-widget the ext/sales-widget branch sitting on my repo].
 
== Configuration ==
 
== Configuration ==
 
To configure how many sales are displayed, in <code>app\Http\Controllers\HomeController.php</code> in the first function in the file edit the '2' in <code>'saleses' => Sales::visible()->orderBy('id', 'DESC')->take(2)->get(),</code> to however many news you'd like to be displayed.
 
To configure how many sales are displayed, in <code>app\Http\Controllers\HomeController.php</code> in the first function in the file edit the '2' in <code>'saleses' => Sales::visible()->orderBy('id', 'DESC')->take(2)->get(),</code> to however many news you'd like to be displayed.
 +
 
The widget itself can be edited and styled in <code>resources\views\widgets\_sales.blade.php</code>.
 
The widget itself can be edited and styled in <code>resources\views\widgets\_sales.blade.php</code>.
 
== Images ==
 
== Images ==

Latest revision as of 03:21, 10 May 2025

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