forked from metin2/web
Shop improvements, renamed "shop" to "mall", support for Argon2ID
This commit is contained in:
24
app/View/Composers/MallComposer.php
Normal file
24
app/View/Composers/MallComposer.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Composers;
|
||||
|
||||
use App\Models\Mall\MallCategory;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class MallComposer
|
||||
{
|
||||
/**
|
||||
* Bind data to the view.
|
||||
*/
|
||||
public function compose(View $view): void
|
||||
{
|
||||
// Fetch the amount of items in storage
|
||||
$view->with('storageCount', 10);
|
||||
|
||||
// Fetch the amount of items in storage
|
||||
$view->with('discountDesc', "20% reducere la chipsuri");
|
||||
|
||||
// Fetch the mall categories
|
||||
$view->with('categories', MallCategory::all());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user