change homepages to contents, add new methods to deliveries and sale_channels by customer

This commit is contained in:
ludo
2023-12-09 23:55:50 +01:00
parent 2a429e4163
commit 25b78f3380
28 changed files with 185 additions and 153 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace App\Repositories\Shop;
use App\Models\Shop\Content;
use App\Traits\Model\Basic;
class Contents
{
use Basic;
public static function getLast()
{
$model = Content::latest('id')->first();
return $model ? $model->text : '';
}
public static function getContent()
{
return self::get(1)->text ?? '';
}
public static function getFooter()
{
return self::get(2)->text ?? '';
}
public static function getExtraFooter()
{
return self::get(3)->text ?? '';
}
public static function getBasketContent()
{
return self::get(4)->text ?? '';
}
public static function getModel()
{
return Content::query();
}
}