user shops + shipping

This commit is contained in:
Kevin Adametz 2019-01-06 01:40:44 +01:00
parent ccc2af4bf7
commit d4f6a774d0
53 changed files with 2326 additions and 814 deletions

View file

@ -6,6 +6,7 @@ namespace App\Services;
class Util
{
private static $postRoute = 'base.';
public static function formatDate(){
if(\App::getLocale() == "en"){
@ -28,4 +29,30 @@ class Util
}
return 'd.m.Y - H:i';
}
public static function getPostRoute(){
return self::$postRoute;
}
public static function setPostRoute($postRoute){
self::$postRoute = $postRoute;
}
public static function getUserShop(){
if(\Session::has('user_shop')){
if($user_shop = \Session::get('user_shop')){
return $user_shop;
}
}
return false;
}
public static function addRoute($p = []){
$b = [];
if(\Session::has('user_shop')){
if($user_shop = \Session::get('user_shop')){
$b = ['subdomain' => $user_shop->slug];
}
}
return array_merge($p, $b);
}
}