change homepages to contents, add new methods to deliveries and sale_channels by customer
This commit is contained in:
43
app/Repositories/Shop/Contents.php
Normal file
43
app/Repositories/Shop/Contents.php
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user