user shops + shipping
This commit is contained in:
parent
ccc2af4bf7
commit
d4f6a774d0
53 changed files with 2326 additions and 814 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue