add shipping rules
This commit is contained in:
@@ -2,15 +2,12 @@
|
||||
|
||||
namespace App\Repositories\Core\App;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
use App\Models\Core\App\Application;
|
||||
use App\Repositories\Core\App\ApplicationPages;
|
||||
use App\Repositories\Languages;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class Applications
|
||||
{
|
||||
|
||||
public static function getFullBySlug($slug)
|
||||
{
|
||||
return Application::with('clients')->active()->bySlug($slug)->first();
|
||||
@@ -34,6 +31,7 @@ class Applications
|
||||
public static function store($data)
|
||||
{
|
||||
$id = isset($data['id']) ? $data['id'] : false;
|
||||
|
||||
return $id ? self::update($data, $id) : self::create($data);
|
||||
}
|
||||
|
||||
@@ -47,6 +45,7 @@ class Applications
|
||||
$id = $id ? $id : $data['id'];
|
||||
$item = self::get($id);
|
||||
$item->update($data);
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
@@ -59,7 +58,7 @@ class Applications
|
||||
{
|
||||
return self::get($id)->name;
|
||||
}
|
||||
|
||||
|
||||
public static function get($id)
|
||||
{
|
||||
return Application::findOrFail($id);
|
||||
@@ -83,6 +82,7 @@ class Applications
|
||||
}
|
||||
$data['langs'] = Languages::getActive();
|
||||
$data['lang'] = Languages::getCurrent();
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -106,11 +106,13 @@ class Applications
|
||||
return Application::active()->bySlug($slug)->first();
|
||||
}
|
||||
|
||||
public static function toggleActive($id, $active) {
|
||||
public static function toggleActive($id, $active)
|
||||
{
|
||||
return self::update(['active' => $active], $id);
|
||||
}
|
||||
|
||||
public static function toggleVisible($id, $visible) {
|
||||
public static function toggleVisible($id, $visible)
|
||||
{
|
||||
return self::update(['visible' => $visible], $id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user