'fixes'
This commit is contained in:
@@ -2,10 +2,40 @@
|
||||
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
|
||||
use App\Models\Shop\Customer;
|
||||
|
||||
class Customers
|
||||
{
|
||||
|
||||
public static function getAvatar()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static function getName()
|
||||
{
|
||||
$user = self::getAuth();
|
||||
return $user ? $user->first_name : '';
|
||||
}
|
||||
|
||||
public static function getAuth()
|
||||
{
|
||||
return Auth::guard('customer')->user();
|
||||
}
|
||||
|
||||
public static function getId()
|
||||
{
|
||||
return Auth::guard('customer')->id();
|
||||
}
|
||||
|
||||
public static function isConnected()
|
||||
{
|
||||
return Auth::guard('customer')->check();
|
||||
}
|
||||
|
||||
public static function getOptions()
|
||||
{
|
||||
return Customer::orderBy('value', 'asc')->get()->pluck('value', 'id')->toArray();
|
||||
|
||||
@@ -40,7 +40,7 @@ class Offers
|
||||
{
|
||||
$sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID();
|
||||
$offer = Offer::withPriceBySaleChannelByQuantity($sale_channel_id, $quantity)->find($id);
|
||||
return number_format($offer->price_lists->first()->price_list_values->first(),2);
|
||||
return $offer->price_lists->first()->price_list_values->first();
|
||||
}
|
||||
|
||||
public static function getBasket()
|
||||
|
||||
Reference in New Issue
Block a user