cosmetic fixes, enhance profile, fix mails, ...
This commit is contained in:
@@ -34,14 +34,14 @@ class Categories
|
||||
return Category::orderBy('name', 'asc')->get();
|
||||
}
|
||||
|
||||
public static function get($id)
|
||||
public static function get($id, $relations = false)
|
||||
{
|
||||
return Category::findOrFail($id);
|
||||
return $relations ? Category::with($relations)->findOrFail($id) : Category::findOrFail($id);
|
||||
}
|
||||
|
||||
public static function getFull($id)
|
||||
{
|
||||
$category = self::get($id);
|
||||
$category = self::get($id, ['Parent']);
|
||||
$data = $category->toArray();
|
||||
$data['name'] = $category->name;
|
||||
$data['description'] = $category->description;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use App\Datatables\Shop\OrdersDataTable;
|
||||
use App\Datatables\Shop\CustomerOrdersDataTable;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
@@ -21,7 +21,7 @@ class Customers
|
||||
public static function editProfile($id = false)
|
||||
{
|
||||
$id = $id ? $id : self::getId();
|
||||
$orders_datatable = new OrdersDataTable;
|
||||
$orders_datatable = new CustomerOrdersDataTable;
|
||||
$data = [
|
||||
'customer' => self::get($id, ['addresses', 'deliveries', 'orders'])->toArray(),
|
||||
'deliveries' => Deliveries::getAll('sale_channel')->toArray(),
|
||||
|
||||
@@ -10,7 +10,7 @@ class Invoices
|
||||
{
|
||||
public static function getByUUID($uuid)
|
||||
{
|
||||
return Order::byUUID($uuid)->first();
|
||||
return Invoice::byUUID($uuid)->first();
|
||||
}
|
||||
|
||||
public static function saveInvoice($order_id, $data)
|
||||
|
||||
Reference in New Issue
Block a user