coding style
This commit is contained in:
@@ -17,7 +17,6 @@ class Order
|
||||
->setLabels(array_keys($data))
|
||||
->setDataset('CA', 'bar', array_values($data))
|
||||
->setColor('#334F17')
|
||||
->setStrokeColors(['#527C39'])
|
||||
;
|
||||
->setStrokeColors(['#527C39']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Shop\Article;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class FixSlug extends Command
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace App\Datatables\Admin\Shop;
|
||||
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Article;
|
||||
use App\Repositories\Shop\Articles;
|
||||
use App\Repositories\Shop\ArticleImages;
|
||||
use App\Repositories\Shop\Articles;
|
||||
use App\Repositories\Shop\Tags;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ class InvoicesDataTable extends DataTable
|
||||
})
|
||||
->editColumn('customer.last_name', function (Invoice $invoice) {
|
||||
$customer = $invoice->customer ?? false;
|
||||
|
||||
return $customer ? $customer->last_name.' '.$customer->first_name : '';
|
||||
})
|
||||
->rawColumns(['action']);
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Charts\Shop\Order;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\Shop\Dashboards;
|
||||
use App\Charts\Shop\Order;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -22,6 +22,7 @@ class HomeController extends Controller
|
||||
|
||||
$data = Dashboards::getStats($start, $end);
|
||||
$data['chart'] = Order::getMonthly();
|
||||
|
||||
// dump($data);
|
||||
// exit;
|
||||
return view('Admin.Shop.Dashboard.index', $data);
|
||||
|
||||
@@ -4,9 +4,9 @@ namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Admin\Shop\ArticlesDataTable;
|
||||
use App\Http\Requests\Admin\Shop\StoreArticlePost;
|
||||
use App\Repositories\Shop\ArticleInherited;
|
||||
use App\Repositories\Shop\ArticleNatures;
|
||||
use App\Repositories\Shop\Articles;
|
||||
use App\Repositories\Shop\ArticleInherited;
|
||||
use App\Repositories\Shop\Categories;
|
||||
use App\Repositories\Shop\Tags;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Admin\Shop\InvoicePaymentsDataTable;
|
||||
use App\Datatables\Admin\Shop\InvoicesDataTable;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\Shop\Invoices;
|
||||
|
||||
@@ -19,6 +19,7 @@ class ArticleController extends Controller
|
||||
public function showBySlug($slug)
|
||||
{
|
||||
$id = Articles::getIDBySlug($slug);
|
||||
|
||||
return $id ? $this->show($id) : view('errors.404');
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Http\Controllers\Shop;
|
||||
|
||||
use App\Http\Controllers\Shop\Controller;
|
||||
use App\Repositories\Shop\Customers;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Http\Controllers\Shop;
|
||||
|
||||
use App\Http\Controllers\Shop\Controller;
|
||||
use App\Datatables\Shop\CustomerInvoicesDataTable;
|
||||
use App\Repositories\Shop\InvoicePDF;
|
||||
use App\Repositories\Shop\Invoices;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Http\Controllers\Shop;
|
||||
|
||||
use App\Datatables\Shop\CustomerOrdersDataTable;
|
||||
use App\Http\Controllers\Shop\Controller;
|
||||
use App\Repositories\Core\User\ShopCart;
|
||||
use App\Repositories\Shop\Baskets;
|
||||
use App\Repositories\Shop\Customers;
|
||||
@@ -71,8 +70,10 @@ class OrderController extends Controller
|
||||
return Paybox::makeAuthorizationRequest($order);
|
||||
}
|
||||
OrderMails::sendOrderConfirmed($order->id);
|
||||
|
||||
return redirect()->route('Shop.Orders.confirmed');
|
||||
}
|
||||
|
||||
return view('Shop.Orders.order');
|
||||
}
|
||||
|
||||
|
||||
@@ -254,8 +254,8 @@ class Article extends Model implements HasMedia
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
'source' => 'name',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,6 @@ namespace App\Repositories\Shop;
|
||||
|
||||
use App\Models\Shop\Article;
|
||||
use App\Models\Shop\Merchandise;
|
||||
use App\Repositories\Botanic\Species;
|
||||
use App\Repositories\Botanic\Varieties;
|
||||
use App\Repositories\Core\Comments;
|
||||
use App\Repositories\Core\Tag;
|
||||
use App\Traits\Model\Basic;
|
||||
use App\Traits\Repository\Imageable;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ArticleCategories
|
||||
{
|
||||
|
||||
@@ -2,15 +2,10 @@
|
||||
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use App\Models\Shop\Article;
|
||||
use App\Models\Shop\Merchandise;
|
||||
use App\Repositories\Botanic\Species;
|
||||
use App\Repositories\Botanic\Varieties;
|
||||
use App\Repositories\Core\Comments;
|
||||
use App\Repositories\Core\Tag;
|
||||
use App\Traits\Model\Basic;
|
||||
use App\Traits\Repository\Imageable;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ArticleImages
|
||||
{
|
||||
|
||||
@@ -3,14 +3,6 @@
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use App\Models\Shop\Article;
|
||||
use App\Models\Shop\Merchandise;
|
||||
use App\Repositories\Botanic\Species;
|
||||
use App\Repositories\Botanic\Varieties;
|
||||
use App\Repositories\Core\Comments;
|
||||
use App\Repositories\Core\Tag;
|
||||
use App\Traits\Model\Basic;
|
||||
use App\Traits\Repository\Imageable;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ArticleSiblings
|
||||
{
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use App\Models\Shop\Article;
|
||||
use App\Models\Shop\Merchandise;
|
||||
use App\Repositories\Botanic\Species;
|
||||
use App\Repositories\Botanic\Varieties;
|
||||
use App\Repositories\Core\Comments;
|
||||
use App\Repositories\Core\Tag;
|
||||
use App\Traits\Model\Basic;
|
||||
use App\Traits\Repository\Imageable;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ArticleTags
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ class BasketStores
|
||||
} else {
|
||||
Basket::create([
|
||||
'id' => $key,
|
||||
'cart_data' => $value
|
||||
'cart_data' => $value,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use LaravelDaily\Invoices\Invoice;
|
||||
use LaravelDaily\Invoices\Classes\Party;
|
||||
use LaravelDaily\Invoices\Classes\InvoiceItem;
|
||||
use LaravelDaily\Invoices\Classes\Party;
|
||||
use LaravelDaily\Invoices\Invoice;
|
||||
|
||||
class InvoicePDF
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use App\Models\Shop\Offer;
|
||||
use App\Traits\Model\Basic;
|
||||
|
||||
class OfferStocks
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace App\Repositories\Shop;
|
||||
use App\Models\Shop\Order;
|
||||
use App\Repositories\Core\DateStats;
|
||||
use App\Repositories\Core\PDF;
|
||||
use App\Repositories\Shop\Customers;
|
||||
use App\Traits\Model\Basic;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
@@ -12,6 +12,7 @@ class Searches
|
||||
'ids' => Article::search($options['search_name'])->get()->pluck('id'),
|
||||
]))->sortBy('searchOrder')->toArray();
|
||||
}
|
||||
|
||||
public static function getResults($options)
|
||||
{
|
||||
return Articles::getArticlesToSell($options);
|
||||
|
||||
@@ -108,6 +108,7 @@ return [
|
||||
'enable_php' => true,
|
||||
/**
|
||||
* Do not write log.html or make it optional
|
||||
*
|
||||
* @see https://github.com/dompdf/dompdf/issues/2810
|
||||
*/
|
||||
'logOutputFile' => '/dev/null',
|
||||
|
||||
@@ -17,7 +17,6 @@ return [
|
||||
*
|
||||
* Defaults to null, which uses the toString() method on your model.
|
||||
*/
|
||||
|
||||
'source' => null,
|
||||
|
||||
/**
|
||||
@@ -25,7 +24,6 @@ return [
|
||||
* no length restrictions are enforced. Set it to a positive integer if you
|
||||
* want to make sure your slugs aren't too long.
|
||||
*/
|
||||
|
||||
'maxLength' => null,
|
||||
|
||||
/**
|
||||
@@ -40,7 +38,6 @@ return [
|
||||
*
|
||||
* "my source string" -> "my-source-st"
|
||||
*/
|
||||
|
||||
'maxLengthKeepWords' => true,
|
||||
|
||||
/**
|
||||
@@ -58,13 +55,11 @@ return [
|
||||
*
|
||||
* 'method' => array('Str','slug'),
|
||||
*/
|
||||
|
||||
'method' => null,
|
||||
|
||||
/**
|
||||
* Separator to use when generating slugs. Defaults to a hyphen.
|
||||
*/
|
||||
|
||||
'separator' => '-',
|
||||
|
||||
/**
|
||||
@@ -76,7 +71,6 @@ return [
|
||||
* my-slug-1
|
||||
* my-slug-2
|
||||
*/
|
||||
|
||||
'unique' => true,
|
||||
|
||||
/**
|
||||
@@ -87,7 +81,6 @@ return [
|
||||
* "similar" slugs. The closure should return the new unique
|
||||
* suffix to append to the slug.
|
||||
*/
|
||||
|
||||
'uniqueSuffix' => null,
|
||||
|
||||
/**
|
||||
@@ -107,7 +100,6 @@ return [
|
||||
* If set to "false", then a new slug could duplicate one that exists on a trashed model.
|
||||
* If set to "true", then uniqueness is enforced across trashed and existing models.
|
||||
*/
|
||||
|
||||
'includeTrashed' => false,
|
||||
|
||||
/**
|
||||
@@ -133,7 +125,6 @@ return [
|
||||
*
|
||||
* and continue from there.
|
||||
*/
|
||||
|
||||
'reserved' => null,
|
||||
|
||||
/**
|
||||
@@ -146,7 +137,6 @@ return [
|
||||
* is probably not a good idea from an SEO point of view.
|
||||
* Only set this to true if you understand the possible consequences.
|
||||
*/
|
||||
|
||||
'onUpdate' => false,
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user