From 64a218afc271e9fbac0308e5e3116e7647bf5533 Mon Sep 17 00:00:00 2001 From: ludo Date: Thu, 22 Feb 2024 19:35:51 +0100 Subject: [PATCH] coding style --- app/Charts/Shop/Order.php | 3 +-- app/Console/Commands/FixSlug.php | 1 - .../Admin/Shop/ArticlesDataTable.php | 2 +- app/Datatables/ParentDataTable.php | 2 +- .../Shop/CustomerInvoicesDataTable.php | 2 +- app/Datatables/Shop/InvoicesDataTable.php | 1 + app/Http/Controllers/Admin/HomeController.php | 3 ++- .../Admin/Shop/ArticleController.php | 2 +- .../Admin/Shop/DeliveryTypeController.php | 2 +- .../Admin/Shop/InvoiceController.php | 1 - .../Controllers/Shop/ArticleController.php | 1 + .../Controllers/Shop/CustomerController.php | 1 - .../Controllers/Shop/InvoiceController.php | 1 - app/Http/Controllers/Shop/OrderController.php | 3 ++- app/Models/Shop/Article.php | 12 ++++++------ app/Models/Shop/Basket.php | 2 +- app/Providers/AppServiceProvider.php | 2 +- app/Repositories/Core/DateStats.php | 4 ++-- app/Repositories/Shop/ArticleCategories.php | 7 ------- app/Repositories/Shop/ArticleImages.php | 5 ----- app/Repositories/Shop/ArticleSiblings.php | 8 -------- app/Repositories/Shop/ArticleTags.php | 8 -------- app/Repositories/Shop/BasketStores.php | 8 ++++---- app/Repositories/Shop/InvoicePDF.php | 16 ++++++++-------- app/Repositories/Shop/OfferStocks.php | 1 - app/Repositories/Shop/Orders.php | 3 +-- app/Repositories/Shop/Searches.php | 1 + app/Traits/Model/Imageable.php | 2 +- config/invoices.php | 19 ++++++++++--------- config/scout.php | 2 +- config/sluggable.php | 10 ---------- ...2024_02_07_210334_create_health_tables.php | 6 +++--- ...01_29_218135_create_shop_baskets_table.php | 6 +++--- 33 files changed, 54 insertions(+), 93 deletions(-) diff --git a/app/Charts/Shop/Order.php b/app/Charts/Shop/Order.php index d1fe17c9..c60f2e5d 100644 --- a/app/Charts/Shop/Order.php +++ b/app/Charts/Shop/Order.php @@ -17,7 +17,6 @@ class Order ->setLabels(array_keys($data)) ->setDataset('CA', 'bar', array_values($data)) ->setColor('#334F17') - ->setStrokeColors(['#527C39']) - ; + ->setStrokeColors(['#527C39']); } } diff --git a/app/Console/Commands/FixSlug.php b/app/Console/Commands/FixSlug.php index bc27b87d..97ebdab7 100644 --- a/app/Console/Commands/FixSlug.php +++ b/app/Console/Commands/FixSlug.php @@ -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 { diff --git a/app/Datatables/Admin/Shop/ArticlesDataTable.php b/app/Datatables/Admin/Shop/ArticlesDataTable.php index 1a1b49d4..e13a6f95 100644 --- a/app/Datatables/Admin/Shop/ArticlesDataTable.php +++ b/app/Datatables/Admin/Shop/ArticlesDataTable.php @@ -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; diff --git a/app/Datatables/ParentDataTable.php b/app/Datatables/ParentDataTable.php index 87ff6c28..fef14091 100644 --- a/app/Datatables/ParentDataTable.php +++ b/app/Datatables/ParentDataTable.php @@ -68,7 +68,7 @@ class ParentDataTable extends DataTable ]); } - public function getButtonDel($field ='id', $title = 'Effacer') + public function getButtonDel($field = 'id', $title = 'Effacer') { return view('components.form.buttons.delete', [ 'dataId' => '{{$'.$field.'}}', diff --git a/app/Datatables/Shop/CustomerInvoicesDataTable.php b/app/Datatables/Shop/CustomerInvoicesDataTable.php index 4b5768da..f6d0bec2 100644 --- a/app/Datatables/Shop/CustomerInvoicesDataTable.php +++ b/app/Datatables/Shop/CustomerInvoicesDataTable.php @@ -41,7 +41,7 @@ class CustomerInvoicesDataTable extends DataTable 'class' => 'btn-sm btn-secondary btn-invoice mr-2', 'icon' => 'fa-file-pdf', 'title' => 'Télécharger la facture', - 'url' => route('Shop.Invoices.pdf') . '/{{$uuid}}', + 'url' => route('Shop.Invoices.pdf').'/{{$uuid}}', ]); $buttons .= self::getButtonShow('uuid', 'Voir la facture'); diff --git a/app/Datatables/Shop/InvoicesDataTable.php b/app/Datatables/Shop/InvoicesDataTable.php index a5e4a1b9..32b48960 100644 --- a/app/Datatables/Shop/InvoicesDataTable.php +++ b/app/Datatables/Shop/InvoicesDataTable.php @@ -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']); diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index 803e37e9..5d09907e 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -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); diff --git a/app/Http/Controllers/Admin/Shop/ArticleController.php b/app/Http/Controllers/Admin/Shop/ArticleController.php index 35eee78b..28e5b14e 100644 --- a/app/Http/Controllers/Admin/Shop/ArticleController.php +++ b/app/Http/Controllers/Admin/Shop/ArticleController.php @@ -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; diff --git a/app/Http/Controllers/Admin/Shop/DeliveryTypeController.php b/app/Http/Controllers/Admin/Shop/DeliveryTypeController.php index 2b61ac62..a1c374af 100644 --- a/app/Http/Controllers/Admin/Shop/DeliveryTypeController.php +++ b/app/Http/Controllers/Admin/Shop/DeliveryTypeController.php @@ -27,7 +27,7 @@ class DeliveryTypeController extends Controller public function edit($id) { - $data = []; + $data = []; $data['delivery'] = DeliveryTypes::get($id)->toArray(); return view('Admin.Shop.DeliveryTypes.edit', $data); diff --git a/app/Http/Controllers/Admin/Shop/InvoiceController.php b/app/Http/Controllers/Admin/Shop/InvoiceController.php index c17c6fa1..25b4f7de 100644 --- a/app/Http/Controllers/Admin/Shop/InvoiceController.php +++ b/app/Http/Controllers/Admin/Shop/InvoiceController.php @@ -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; diff --git a/app/Http/Controllers/Shop/ArticleController.php b/app/Http/Controllers/Shop/ArticleController.php index 07ac0665..11664cf4 100644 --- a/app/Http/Controllers/Shop/ArticleController.php +++ b/app/Http/Controllers/Shop/ArticleController.php @@ -19,6 +19,7 @@ class ArticleController extends Controller public function showBySlug($slug) { $id = Articles::getIDBySlug($slug); + return $id ? $this->show($id) : view('errors.404'); } diff --git a/app/Http/Controllers/Shop/CustomerController.php b/app/Http/Controllers/Shop/CustomerController.php index 77fad96c..f252bafa 100644 --- a/app/Http/Controllers/Shop/CustomerController.php +++ b/app/Http/Controllers/Shop/CustomerController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Shop; -use App\Http\Controllers\Shop\Controller; use App\Repositories\Shop\Customers; use Illuminate\Http\Request; diff --git a/app/Http/Controllers/Shop/InvoiceController.php b/app/Http/Controllers/Shop/InvoiceController.php index c1b064b9..a5d9e380 100644 --- a/app/Http/Controllers/Shop/InvoiceController.php +++ b/app/Http/Controllers/Shop/InvoiceController.php @@ -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; diff --git a/app/Http/Controllers/Shop/OrderController.php b/app/Http/Controllers/Shop/OrderController.php index 35ee6ca4..8334ad03 100644 --- a/app/Http/Controllers/Shop/OrderController.php +++ b/app/Http/Controllers/Shop/OrderController.php @@ -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'); } diff --git a/app/Models/Shop/Article.php b/app/Models/Shop/Article.php index 5cc0acb6..be93e1b2 100644 --- a/app/Models/Shop/Article.php +++ b/app/Models/Shop/Article.php @@ -210,7 +210,7 @@ class Article extends Model implements HasMedia { return $query->whereHas('offers', function ($query) use ($saleChannelId) { $query->active()->byStockAvailable(); - + if ($saleChannelId) { $query->bySaleChannel($saleChannelId); } @@ -223,11 +223,11 @@ class Article extends Model implements HasMedia $product = $this->product ?? false; if (is_object($product)) { - $description .= ' ' . $product ? $product->description : ''; - $description .= ' ' . $product ? $product->plus ?? '' : ''; + $description .= ' '.$product ? $product->description : ''; + $description .= ' '.$product ? $product->plus ?? '' : ''; $specie = $product ? $product->specie : false; - $description .= ' ' . $specie ? $specie->description ?? '' : ''; + $description .= ' '.$specie ? $specie->description ?? '' : ''; } return [ @@ -254,8 +254,8 @@ class Article extends Model implements HasMedia { return [ 'slug' => [ - 'source' => 'name' - ] + 'source' => 'name', + ], ]; } } diff --git a/app/Models/Shop/Basket.php b/app/Models/Shop/Basket.php index 8ade01fd..cb6a9548 100644 --- a/app/Models/Shop/Basket.php +++ b/app/Models/Shop/Basket.php @@ -29,4 +29,4 @@ class Basket extends Model { return unserialize($value); } -} \ No newline at end of file +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 685b0b55..ec589016 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -11,7 +11,7 @@ class AppServiceProvider extends ServiceProvider { public function boot() { - if(config('app.env') === 'production') { + if (config('app.env') === 'production') { \URL::forceScheme('https'); } Schema::defaultStringLength(191); diff --git a/app/Repositories/Core/DateStats.php b/app/Repositories/Core/DateStats.php index 64cee987..88a8d350 100644 --- a/app/Repositories/Core/DateStats.php +++ b/app/Repositories/Core/DateStats.php @@ -27,7 +27,7 @@ trait DateStats { $periods = DateRange::getPeriodsLastMonth(12); $values = self::sumPeriodly($periods, $field, $fieldDate); - + return self::buildLabels($periods, $values, 'MMM YY'); } @@ -46,7 +46,7 @@ trait DateStats $index = Carbon::parse($period->startDate)->isoFormat($format); $data[$index] = $values[$key]; } - + return $data; } diff --git a/app/Repositories/Shop/ArticleCategories.php b/app/Repositories/Shop/ArticleCategories.php index b4927c00..0d3bf6bd 100644 --- a/app/Repositories/Shop/ArticleCategories.php +++ b/app/Repositories/Shop/ArticleCategories.php @@ -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 { diff --git a/app/Repositories/Shop/ArticleImages.php b/app/Repositories/Shop/ArticleImages.php index 3152b269..f4dc6af2 100644 --- a/app/Repositories/Shop/ArticleImages.php +++ b/app/Repositories/Shop/ArticleImages.php @@ -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 { diff --git a/app/Repositories/Shop/ArticleSiblings.php b/app/Repositories/Shop/ArticleSiblings.php index bd9677d0..d345a19e 100644 --- a/app/Repositories/Shop/ArticleSiblings.php +++ b/app/Repositories/Shop/ArticleSiblings.php @@ -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 { diff --git a/app/Repositories/Shop/ArticleTags.php b/app/Repositories/Shop/ArticleTags.php index db60e233..053e3e76 100644 --- a/app/Repositories/Shop/ArticleTags.php +++ b/app/Repositories/Shop/ArticleTags.php @@ -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 { diff --git a/app/Repositories/Shop/BasketStores.php b/app/Repositories/Shop/BasketStores.php index 95bd5332..1cd1b700 100644 --- a/app/Repositories/Shop/BasketStores.php +++ b/app/Repositories/Shop/BasketStores.php @@ -17,7 +17,7 @@ class BasketStores public function get($key) { - if($this->has($key)) { + if ($this->has($key)) { return new CartCollection(Basket::find($key)->cart_data); } else { return []; @@ -26,14 +26,14 @@ class BasketStores public function put($key, $value) { - if($row = Basket::find($key)) { + if ($row = Basket::find($key)) { // update $row->cart_data = $value; $row->save(); } else { Basket::create([ 'id' => $key, - 'cart_data' => $value + 'cart_data' => $value, ]); } } @@ -41,5 +41,5 @@ class BasketStores public static function getModel() { return Basket::query(); - } + } } diff --git a/app/Repositories/Shop/InvoicePDF.php b/app/Repositories/Shop/InvoicePDF.php index 80d1f208..da6e2404 100644 --- a/app/Repositories/Shop/InvoicePDF.php +++ b/app/Repositories/Shop/InvoicePDF.php @@ -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 { @@ -18,8 +18,8 @@ class InvoicePDF { $invoice = Invoices::getFull($id); $customer = new Party([ - 'name' => $invoice->customer->name, - 'address' => self::makeAddress($invoice->address), + 'name' => $invoice->customer->name, + 'address' => self::makeAddress($invoice->address), 'custom_fields' => [ 'order number' => $invoice->order->ref, ], @@ -27,13 +27,13 @@ class InvoicePDF $items = self::makeItems($invoice->order->detail); - $invoice = Invoice::make(__('invoices::invoice.invoice') . ' ' .$invoice->ref) + $invoice = Invoice::make(__('invoices::invoice.invoice').' '.$invoice->ref) ->status(Invoices::getStatus($invoice->status)) ->buyer($customer) ->shipping($invoice->shipping) ->date(Carbon::parse($invoice->date_invoice)) ->payUntilDays(14) - ->filename('invoice-' . $invoice->ref . '-' . $invoice->uuid) + ->filename('invoice-'.$invoice->ref.'-'.$invoice->uuid) ->addItems($items) ->notes($invoice->comment ?? '') ->logo(public_path('img/logo.png')) @@ -48,7 +48,7 @@ class InvoicePDF public static function makeAddress($address) { - return $address->address . '
' . $address->zipcode . ' ' . $address->city; + return $address->address.'
'.$address->zipcode.' '.$address->city; } public static function makeItems($details) @@ -61,7 +61,7 @@ class InvoicePDF ->taxByPercent($detail->vat) ->quantity($detail->quantity); } - + return $items; } } diff --git a/app/Repositories/Shop/OfferStocks.php b/app/Repositories/Shop/OfferStocks.php index 360d9388..245c8ccf 100644 --- a/app/Repositories/Shop/OfferStocks.php +++ b/app/Repositories/Shop/OfferStocks.php @@ -3,7 +3,6 @@ namespace App\Repositories\Shop; use App\Models\Shop\Offer; -use App\Traits\Model\Basic; class OfferStocks { diff --git a/app/Repositories/Shop/Orders.php b/app/Repositories/Shop/Orders.php index e3ac303f..6ec1b9c3 100644 --- a/app/Repositories/Shop/Orders.php +++ b/app/Repositories/Shop/Orders.php @@ -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; @@ -30,7 +29,7 @@ class Orders public static function getPdfByUUID($uuid) { - return self::getPdf(self::getIdByUUID($uuid), 'commande-' . $uuid . '.pdf'); + return self::getPdf(self::getIdByUUID($uuid), 'commande-'.$uuid.'.pdf'); } public static function getPdf($id, $file = 'order.pdf') diff --git a/app/Repositories/Shop/Searches.php b/app/Repositories/Shop/Searches.php index d958c131..5e6a6632 100644 --- a/app/Repositories/Shop/Searches.php +++ b/app/Repositories/Shop/Searches.php @@ -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); diff --git a/app/Traits/Model/Imageable.php b/app/Traits/Model/Imageable.php index 72815e10..84a31fbc 100644 --- a/app/Traits/Model/Imageable.php +++ b/app/Traits/Model/Imageable.php @@ -49,7 +49,7 @@ trait Imageable ->watermarkHeight(100, Manipulations::UNIT_PERCENT) ->watermarkWidth(100, Manipulations::UNIT_PERCENT) ->watermarkFit(Manipulations::FIT_FILL); - + // $this->addMediaConversion('zoom')->fit(Manipulations::FIT_CROP, 1200, 1200)->withResponsiveImages(); } } diff --git a/config/invoices.php b/config/invoices.php index 37911a2a..264bf6d3 100644 --- a/config/invoices.php +++ b/config/invoices.php @@ -15,14 +15,14 @@ return [ ], 'serial_number' => [ - 'series' => 'AA', + 'series' => 'AA', 'sequence' => 1, /* * Sequence will be padded accordingly, for ex. 00001 */ 'sequence_padding' => 5, - 'delimiter' => '.', + 'delimiter' => '.', /* * Supported tags {SERIES}, {DELIMITER}, {SEQUENCE} @@ -41,7 +41,7 @@ return [ * Example: Amount in words: Eight hundred fifty thousand sixty-eight EUR and fifteen ct. */ 'fraction' => 'ct.', - 'symbol' => '€', + 'symbol' => '€', /* * Example: 19.00 @@ -68,7 +68,7 @@ return [ 'paper' => [ // A4 = 210 mm x 297 mm = 595 pt x 842 pt - 'size' => 'a4', + 'size' => 'a4', 'orientation' => 'portrait', ], @@ -87,11 +87,11 @@ return [ * Default attributes for Seller::class */ 'attributes' => [ - 'name' => 'Jardin\'Envie', - 'address' => '89982 Pfeffer Falls Damianstad, CO 66972-8160', - 'code' => '41-1985581', - 'vat' => '123456789', - 'phone' => '760-355-3930', + 'name' => 'Jardin\'Envie', + 'address' => '89982 Pfeffer Falls Damianstad, CO 66972-8160', + 'code' => '41-1985581', + 'vat' => '123456789', + 'phone' => '760-355-3930', 'custom_fields' => [ /* * Custom attributes for Seller::class @@ -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', diff --git a/config/scout.php b/config/scout.php index 77d6c51b..bd043f73 100644 --- a/config/scout.php +++ b/config/scout.php @@ -136,7 +136,7 @@ return [ 'key' => env('MEILISEARCH_KEY', null), 'index-settings' => [ Article::class => [ - 'filterableAttributes'=> ['article_nature_id'], + 'filterableAttributes' => ['article_nature_id'], 'sortableAttributes' => ['name', 'created_at'], ], ], diff --git a/config/sluggable.php b/config/sluggable.php index 2b1495b7..ca0c6615 100644 --- a/config/sluggable.php +++ b/config/sluggable.php @@ -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, /** diff --git a/database/migrations/2024_02_07_210334_create_health_tables.php b/database/migrations/2024_02_07_210334_create_health_tables.php index fed7adf6..d9808aea 100644 --- a/database/migrations/2024_02_07_210334_create_health_tables.php +++ b/database/migrations/2024_02_07_210334_create_health_tables.php @@ -12,7 +12,7 @@ return new class extends Migration { $connection = (new HealthCheckResultHistoryItem())->getConnectionName(); $tableName = EloquentHealthResultStore::getHistoryItemInstance()->getTable(); - + Schema::connection($connection)->create($tableName, function (Blueprint $table) { $table->id(); @@ -27,8 +27,8 @@ return new class extends Migration $table->timestamps(); }); - - Schema::connection($connection)->table($tableName, function(Blueprint $table) { + + Schema::connection($connection)->table($tableName, function (Blueprint $table) { $table->index('created_at'); $table->index('batch'); }); diff --git a/database/migrations/shop/2024_01_29_218135_create_shop_baskets_table.php b/database/migrations/shop/2024_01_29_218135_create_shop_baskets_table.php index cfc7a621..52d7a2ad 100644 --- a/database/migrations/shop/2024_01_29_218135_create_shop_baskets_table.php +++ b/database/migrations/shop/2024_01_29_218135_create_shop_baskets_table.php @@ -1,8 +1,8 @@