44 lines
746 B
PHP
44 lines
746 B
PHP
<?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 getHomepage()
|
|
{
|
|
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();
|
|
}
|
|
}
|