From e27ee40ff34b7f2116e941783e9b5580ed1b7ea3 Mon Sep 17 00:00:00 2001 From: Jason Beggs Date: Wed, 13 Dec 2023 11:52:49 -0500 Subject: [PATCH 1/7] Start upgrading Livewire to v3 --- .../Livewire/BillingPortalPurchase.php | 4 +- .../Livewire/BillingPortalPurchasev2.php | 4 +- app/{Http => }/Livewire/CreditsTable.php | 2 +- app/{Http => }/Livewire/DocumentsTable.php | 2 +- app/{Http => }/Livewire/InvoicesTable.php | 2 +- app/{Http => }/Livewire/PayNowDropdown.php | 2 +- .../PaymentMethods/UpdateDefaultMethod.php | 4 +- .../Livewire/PaymentMethodsTable.php | 2 +- app/{Http => }/Livewire/PaymentsTable.php | 2 +- app/{Http => }/Livewire/PdfSlot.php | 2 +- .../Livewire/Profile/Settings/General.php | 2 +- .../Profile/Settings/NameWebsiteLogo.php | 2 +- .../Profile/Settings/PersonalAddress.php | 2 +- .../Profile/Settings/ShippingAddress.php | 2 +- .../Livewire/PurchaseOrdersTable.php | 2 +- app/{Http => }/Livewire/QuotesTable.php | 2 +- .../Livewire/RecurringInvoiceCancellation.php | 2 +- .../RecurringInvoices/UpdateAutoBilling.php | 2 +- .../Livewire/RecurringInvoicesTable.php | 2 +- .../Livewire/RequiredClientInfo.php | 2 +- .../Livewire/SubscriptionPlanSwitch.php | 6 +- .../SubscriptionRecurringInvoicesTable.php | 2 +- .../Livewire/SubscriptionsTable.php | 2 +- app/{Http => }/Livewire/TasksTable.php | 2 +- app/{Http => }/Livewire/WepaySignup.php | 2 +- composer.json | 4 +- composer.lock | 33 +-- config/livewire.php | 211 +++++++++--------- .../general/sidebar/header.blade.php | 2 +- .../general/sidebar/vendor_header.blade.php | 3 +- .../billing-portal-purchase.blade.php | 14 +- .../billing-portal-purchasev2.blade.php | 24 +- .../livewire/credits-table.blade.php | 2 +- .../livewire/documents-table.blade.php | 2 +- .../livewire/invoices-table.blade.php | 8 +- .../livewire/pay-now-dropdown.blade.php | 2 +- .../livewire/payment-methods-table.blade.php | 2 +- .../livewire/payments-table.blade.php | 2 +- .../livewire/purchase-orders-table.blade.php | 6 +- .../livewire/quotes-table.blade.php | 8 +- .../recurring-invoices-table.blade.php | 2 +- .../livewire/required-client-info.blade.php | 6 +- ...iptions-recurring-invoices-table.blade.php | 2 +- .../livewire/subscriptions-table.blade.php | 2 +- .../components/livewire/tasks-table.blade.php | 2 +- .../update-default-payment-method.blade.php | 2 +- .../portal/ninja2020/credits/index.blade.php | 2 +- .../wepay/signup/wepay-signup.blade.php | 22 +- .../invoices/includes/signature.blade.php | 6 +- .../invoices/includes/terms.blade.php | 6 +- .../portal/ninja2020/layout/app.blade.php | 2 +- .../profile/settings/general.blade.php | 14 +- .../settings/name-website-logo.blade.php | 10 +- .../settings/personal-address.blade.php | 14 +- .../settings/shipping-address.blade.php | 14 +- .../views/vendor/livewire/bootstrap.blade.php | 60 +++++ .../livewire/simple-bootstrap.blade.php | 20 +- .../vendor/livewire/simple-tailwind.blade.php | 56 +++++ .../views/vendor/livewire/tailwind.blade.php | 126 +++++++++++ tests/Feature/ClientPortal/CreditsTest.php | 2 +- tests/Feature/ClientPortal/InvoicesTest.php | 2 +- 61 files changed, 505 insertions(+), 250 deletions(-) rename app/{Http => }/Livewire/BillingPortalPurchase.php (99%) rename app/{Http => }/Livewire/BillingPortalPurchasev2.php (99%) rename app/{Http => }/Livewire/CreditsTable.php (98%) rename app/{Http => }/Livewire/DocumentsTable.php (99%) rename app/{Http => }/Livewire/InvoicesTable.php (98%) rename app/{Http => }/Livewire/PayNowDropdown.php (96%) rename app/{Http => }/Livewire/PaymentMethods/UpdateDefaultMethod.php (91%) rename app/{Http => }/Livewire/PaymentMethodsTable.php (97%) rename app/{Http => }/Livewire/PaymentsTable.php (98%) rename app/{Http => }/Livewire/PdfSlot.php (99%) rename app/{Http => }/Livewire/Profile/Settings/General.php (97%) rename app/{Http => }/Livewire/Profile/Settings/NameWebsiteLogo.php (96%) rename app/{Http => }/Livewire/Profile/Settings/PersonalAddress.php (97%) rename app/{Http => }/Livewire/Profile/Settings/ShippingAddress.php (97%) rename app/{Http => }/Livewire/PurchaseOrdersTable.php (98%) rename app/{Http => }/Livewire/QuotesTable.php (98%) rename app/{Http => }/Livewire/RecurringInvoiceCancellation.php (97%) rename app/{Http => }/Livewire/RecurringInvoices/UpdateAutoBilling.php (96%) rename app/{Http => }/Livewire/RecurringInvoicesTable.php (97%) rename app/{Http => }/Livewire/RequiredClientInfo.php (99%) rename app/{Http => }/Livewire/SubscriptionPlanSwitch.php (96%) rename app/{Http => }/Livewire/SubscriptionRecurringInvoicesTable.php (97%) rename app/{Http => }/Livewire/SubscriptionsTable.php (97%) rename app/{Http => }/Livewire/TasksTable.php (98%) rename app/{Http => }/Livewire/WepaySignup.php (99%) create mode 100644 resources/views/vendor/livewire/bootstrap.blade.php create mode 100644 resources/views/vendor/livewire/simple-tailwind.blade.php create mode 100644 resources/views/vendor/livewire/tailwind.blade.php diff --git a/app/Http/Livewire/BillingPortalPurchase.php b/app/Livewire/BillingPortalPurchase.php similarity index 99% rename from app/Http/Livewire/BillingPortalPurchase.php rename to app/Livewire/BillingPortalPurchase.php index caa9b4b19571..6d6373290128 100644 --- a/app/Http/Livewire/BillingPortalPurchase.php +++ b/app/Livewire/BillingPortalPurchase.php @@ -9,7 +9,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\DataMapper\ClientSettings; use App\Factory\ClientFactory; @@ -411,7 +411,7 @@ class BillingPortalPurchase extends Component 'campaign' => $this->campaign, ], now()->addMinutes(60)); - $this->emit('beforePaymentEventsCompleted'); + $this->dispatch('beforePaymentEventsCompleted'); } /** diff --git a/app/Http/Livewire/BillingPortalPurchasev2.php b/app/Livewire/BillingPortalPurchasev2.php similarity index 99% rename from app/Http/Livewire/BillingPortalPurchasev2.php rename to app/Livewire/BillingPortalPurchasev2.php index cd70adc27ff5..33524db77138 100644 --- a/app/Http/Livewire/BillingPortalPurchasev2.php +++ b/app/Livewire/BillingPortalPurchasev2.php @@ -9,7 +9,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\DataMapper\ClientSettings; use App\Factory\ClientFactory; @@ -542,7 +542,7 @@ class BillingPortalPurchasev2 extends Component 'bundle' => $this->bundle, ], now()->addMinutes(60)); - $this->emit('beforePaymentEventsCompleted'); + $this->dispatch('beforePaymentEventsCompleted'); return $this; } diff --git a/app/Http/Livewire/CreditsTable.php b/app/Livewire/CreditsTable.php similarity index 98% rename from app/Http/Livewire/CreditsTable.php rename to app/Livewire/CreditsTable.php index b22b00cf0a79..088a8a549568 100644 --- a/app/Http/Livewire/CreditsTable.php +++ b/app/Livewire/CreditsTable.php @@ -10,7 +10,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\Libraries\MultiDB; use App\Models\Company; diff --git a/app/Http/Livewire/DocumentsTable.php b/app/Livewire/DocumentsTable.php similarity index 99% rename from app/Http/Livewire/DocumentsTable.php rename to app/Livewire/DocumentsTable.php index ae0500bfeebe..c62017d318b0 100644 --- a/app/Http/Livewire/DocumentsTable.php +++ b/app/Livewire/DocumentsTable.php @@ -10,7 +10,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\Libraries\MultiDB; use App\Models\Client; diff --git a/app/Http/Livewire/InvoicesTable.php b/app/Livewire/InvoicesTable.php similarity index 98% rename from app/Http/Livewire/InvoicesTable.php rename to app/Livewire/InvoicesTable.php index 80b43cdd0059..ef34b10ffb58 100644 --- a/app/Http/Livewire/InvoicesTable.php +++ b/app/Livewire/InvoicesTable.php @@ -10,7 +10,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\Libraries\MultiDB; use App\Models\Company; diff --git a/app/Http/Livewire/PayNowDropdown.php b/app/Livewire/PayNowDropdown.php similarity index 96% rename from app/Http/Livewire/PayNowDropdown.php rename to app/Livewire/PayNowDropdown.php index 579a1a0a63ae..4edfe969d4d4 100644 --- a/app/Http/Livewire/PayNowDropdown.php +++ b/app/Livewire/PayNowDropdown.php @@ -10,7 +10,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\Libraries\MultiDB; use Livewire\Component; diff --git a/app/Http/Livewire/PaymentMethods/UpdateDefaultMethod.php b/app/Livewire/PaymentMethods/UpdateDefaultMethod.php similarity index 91% rename from app/Http/Livewire/PaymentMethods/UpdateDefaultMethod.php rename to app/Livewire/PaymentMethods/UpdateDefaultMethod.php index 565d08b0daeb..da03ba8eda13 100644 --- a/app/Http/Livewire/PaymentMethods/UpdateDefaultMethod.php +++ b/app/Livewire/PaymentMethods/UpdateDefaultMethod.php @@ -10,7 +10,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire\PaymentMethods; +namespace App\Livewire\PaymentMethods; use App\Libraries\MultiDB; use Livewire\Component; @@ -46,7 +46,7 @@ class UpdateDefaultMethod extends Component $this->token->is_default = 1; $this->token->save(); - $this->emit('UpdateDefaultMethod::method-updated'); + $this->dispatch('UpdateDefaultMethod::method-updated'); } public function render() diff --git a/app/Http/Livewire/PaymentMethodsTable.php b/app/Livewire/PaymentMethodsTable.php similarity index 97% rename from app/Http/Livewire/PaymentMethodsTable.php rename to app/Livewire/PaymentMethodsTable.php index 1c8d8166b8af..d3d70c79a5c3 100644 --- a/app/Http/Livewire/PaymentMethodsTable.php +++ b/app/Livewire/PaymentMethodsTable.php @@ -1,6 +1,6 @@ handlePaymentNotRequired(); } - $this->emit('beforePaymentEventsCompleted'); + $this->dispatch('beforePaymentEventsCompleted'); } /** @@ -153,7 +153,7 @@ class SubscriptionPlanSwitch extends Component $this->hide_button = true; - $this->dispatchBrowserEvent('redirectRoute', ['route' => $response]); + $this->dispatch('redirectRoute', ['route' => $response]); // return redirect($response); } diff --git a/app/Http/Livewire/SubscriptionRecurringInvoicesTable.php b/app/Livewire/SubscriptionRecurringInvoicesTable.php similarity index 97% rename from app/Http/Livewire/SubscriptionRecurringInvoicesTable.php rename to app/Livewire/SubscriptionRecurringInvoicesTable.php index 3820d37338a8..2cdb54a50a42 100644 --- a/app/Http/Livewire/SubscriptionRecurringInvoicesTable.php +++ b/app/Livewire/SubscriptionRecurringInvoicesTable.php @@ -10,7 +10,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\Libraries\MultiDB; use App\Models\RecurringInvoice; diff --git a/app/Http/Livewire/SubscriptionsTable.php b/app/Livewire/SubscriptionsTable.php similarity index 97% rename from app/Http/Livewire/SubscriptionsTable.php rename to app/Livewire/SubscriptionsTable.php index f05c07f4b7df..6cfe6140b09d 100644 --- a/app/Http/Livewire/SubscriptionsTable.php +++ b/app/Livewire/SubscriptionsTable.php @@ -10,7 +10,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\Libraries\MultiDB; use App\Models\RecurringInvoice; diff --git a/app/Http/Livewire/TasksTable.php b/app/Livewire/TasksTable.php similarity index 98% rename from app/Http/Livewire/TasksTable.php rename to app/Livewire/TasksTable.php index fa3f45df6ee2..ea77f8588360 100644 --- a/app/Http/Livewire/TasksTable.php +++ b/app/Livewire/TasksTable.php @@ -10,7 +10,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\Libraries\MultiDB; use App\Models\Task; diff --git a/app/Http/Livewire/WepaySignup.php b/app/Livewire/WepaySignup.php similarity index 99% rename from app/Http/Livewire/WepaySignup.php rename to app/Livewire/WepaySignup.php index b61af24d2944..fde0a479e923 100644 --- a/app/Http/Livewire/WepaySignup.php +++ b/app/Livewire/WepaySignup.php @@ -10,7 +10,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Http\Livewire; +namespace App\Livewire; use App\DataMapper\FeesAndLimits; use App\Factory\CompanyGatewayFactory; diff --git a/composer.json b/composer.json index 1ef66cdd1760..9addd537687d 100644 --- a/composer.json +++ b/composer.json @@ -68,7 +68,7 @@ "league/flysystem-aws-s3-v3": "^3.0", "league/fractal": "^0.20.0", "league/omnipay": "^3.1", - "livewire/livewire": "^2.10", + "livewire/livewire": "^3.0", "microsoft/microsoft-graph": "^1.69", "mollie/mollie-api-php": "^2.36", "nelexa/zip": "^4.0", @@ -179,4 +179,4 @@ ], "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index a35b4329b536..4b19f436b913 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "28b57fe6eac3d71c607125cda9a6a537", + "content-hash": "a0ba564c418c368cf4df13ff888b4ede", "packages": [ { "name": "afosto/yaac", @@ -5843,33 +5843,34 @@ }, { "name": "livewire/livewire", - "version": "v2.12.6", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "7d3a57b3193299cf1a0639a3935c696f4da2cf92" + "reference": "7c1f609515e74ef1197c08e56a5606571b3ec1d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/7d3a57b3193299cf1a0639a3935c696f4da2cf92", - "reference": "7d3a57b3193299cf1a0639a3935c696f4da2cf92", + "url": "https://api.github.com/repos/livewire/livewire/zipball/7c1f609515e74ef1197c08e56a5606571b3ec1d9", + "reference": "7c1f609515e74ef1197c08e56a5606571b3ec1d9", "shasum": "" }, "require": { - "illuminate/database": "^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "^7.0|^8.0|^9.0|^10.0", - "illuminate/validation": "^7.0|^8.0|^9.0|^10.0", + "illuminate/database": "^10.0", + "illuminate/support": "^10.0", + "illuminate/validation": "^10.0", "league/mime-type-detection": "^1.9", - "php": "^7.2.5|^8.0", - "symfony/http-kernel": "^5.0|^6.0" + "php": "^8.1", + "symfony/http-kernel": "^6.2" }, "require-dev": { "calebporzio/sushi": "^2.1", - "laravel/framework": "^7.0|^8.0|^9.0|^10.0", + "laravel/framework": "^10.0", + "laravel/prompts": "^0.1.6", "mockery/mockery": "^1.3.1", - "orchestra/testbench": "^5.0|^6.0|^7.0|^8.0", - "orchestra/testbench-dusk": "^5.2|^6.0|^7.0|^8.0", - "phpunit/phpunit": "^8.4|^9.0", + "orchestra/testbench": "^8.0", + "orchestra/testbench-dusk": "^8.0", + "phpunit/phpunit": "^9.0", "psy/psysh": "@stable" }, "type": "library", @@ -5904,7 +5905,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v2.12.6" + "source": "https://github.com/livewire/livewire/tree/v3.3.0" }, "funding": [ { @@ -5912,7 +5913,7 @@ "type": "github" } ], - "time": "2023-08-11T04:02:34+00:00" + "time": "2023-12-11T18:04:00+00:00" }, { "name": "maennchen/zipstream-php", diff --git a/config/livewire.php b/config/livewire.php index 59f8d5c4ddc7..cdce349381eb 100644 --- a/config/livewire.php +++ b/config/livewire.php @@ -3,156 +3,157 @@ return [ /* - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | Class Namespace - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | - | This value sets the root namespace for Livewire component classes in - | your application. This value affects component auto-discovery and - | any Livewire file helper commands, like `artisan make:livewire`. - | - | After changing this item, run: `php artisan livewire:discover`. + | This value sets the root class namespace for Livewire component classes in + | your application. This value will change where component auto-discovery + | finds components. It's also referenced by the file creation commands. | */ - 'class_namespace' => 'App\\Http\\Livewire', + 'class_namespace' => 'App\\Livewire', /* - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | View Path - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | - | This value sets the path for Livewire component views. This affects - | file manipulation helper commands like `artisan make:livewire`. + | This value is used to specify where Livewire component Blade templates are + | stored when running file creation commands like `artisan make:livewire`. + | It is also used if you choose to omit a component's render() method. | */ 'view_path' => resource_path('views/livewire'), /* - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | Layout - |-------------------------------------------------------------------------- - | The default layout view that will be used when rendering a component via - | Route::get('/some-endpoint', SomeComponent::class);. In this case the - | the view returned by SomeComponent will be wrapped in "layouts.app" + |--------------------------------------------------------------------------- + | The view that will be used as the layout when rendering a single component + | as an entire page via `Route::get('/post/create', CreatePost::class);`. + | In this case, the view returned by CreatePost will render into $slot. | */ 'layout' => 'layouts.app', /* - |-------------------------------------------------------------------------- - | Livewire Assets URL - |-------------------------------------------------------------------------- - | - | This value sets the path to Livewire JavaScript assets, for cases where - | your app's domain root is not the correct path. By default, Livewire - | will load its JavaScript assets from the app's "relative root". - | - | Examples: "/assets", "myurl.com/app". + |--------------------------------------------------------------------------- + | Lazy Loading Placeholder + |--------------------------------------------------------------------------- + | Livewire allows you to lazy load components that would otherwise slow down + | the initial page load. Every component can have a custom placeholder or + | you can define the default placeholder view for all components below. | */ - 'asset_url' => null, + 'lazy_placeholder' => null, /* - |-------------------------------------------------------------------------- - | Livewire App URL - |-------------------------------------------------------------------------- - | - | This value should be used if livewire assets are served from CDN. - | Livewire will communicate with an app through this url. - | - | Examples: "https://my-app.com", "myurl.com/app". - | - */ - - 'app_url' => null, - - /* - |-------------------------------------------------------------------------- - | Livewire Endpoint Middleware Group - |-------------------------------------------------------------------------- - | - | This value sets the middleware group that will be applied to the main - | Livewire "message" endpoint (the endpoint that gets hit everytime - | a Livewire component updates). It is set to "web" by default. - | - */ - - 'middleware_group' => 'web', - - /* - |-------------------------------------------------------------------------- - | Livewire Temporary File Uploads Endpoint Configuration - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- + | Temporary File Uploads + |--------------------------------------------------------------------------- | | Livewire handles file uploads by storing uploads in a temporary directory - | before the file is validated and stored permanently. All file uploads - | are directed to a global endpoint for temporary storage. The config - | items below are used for customizing the way the endpoint works. + | before the file is stored permanently. All file uploads are directed to + | a global endpoint for temporary storage. You may configure this below: | */ 'temporary_file_upload' => [ - 'disk' => null, // Example: 'local', 's3' Default: 'default' - 'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB) - 'directory' => null, // Example: 'tmp' Default 'livewire-tmp' - 'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1' - 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs. + 'disk' => null, // Example: 'local', 's3' | Default: 'default' + 'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB) + 'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp' + 'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1' + 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs... 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4', 'mov', 'avi', 'wmv', 'mp3', 'm4a', 'jpg', 'jpeg', 'mpga', 'webp', 'wma', ], - 'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated. + 'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated... ], /* - |-------------------------------------------------------------------------- - | Manifest File Path - |-------------------------------------------------------------------------- - | - | This value sets the path to the Livewire manifest file. - | The default should work for most cases (which is - | "/bootstrap/cache/livewire-components.php"), but for specific - | cases like when hosting on Laravel Vapor, it could be set to a different value. - | - | Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php". - | - */ - - 'manifest_path' => null, - - /* - |-------------------------------------------------------------------------- - | Back Button Cache - |-------------------------------------------------------------------------- - | - | This value determines whether the back button cache will be used on pages - | that contain Livewire. By disabling back button cache, it ensures that - | the back button shows the correct state of components, instead of - | potentially stale, cached data. - | - | Setting it to "false" (default) will disable back button cache. - | - */ - - 'back_button_cache' => false, - - /* - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | Render On Redirect - |-------------------------------------------------------------------------- + |--------------------------------------------------------------------------- | - | This value determines whether Livewire will render before it's redirected - | or not. Setting it to "false" (default) will mean the render method is - | skipped when redirecting. And "true" will mean the render method is - | run before redirecting. Browsers bfcache can store a potentially - | stale view if render is skipped on redirect. + | This value determines if Livewire will run a component's `render()` method + | after a redirect has been triggered using something like `redirect(...)` + | Setting this to true will render the view once more before redirecting | */ 'render_on_redirect' => false, + /* + |--------------------------------------------------------------------------- + | Eloquent Model Binding + |--------------------------------------------------------------------------- + | + | Previous versions of Livewire supported binding directly to eloquent model + | properties using wire:model by default. However, this behavior has been + | deemed too "magical" and has therefore been put under a feature flag. + | + */ + + 'legacy_model_binding' => false, + + /* + |--------------------------------------------------------------------------- + | Auto-inject Frontend Assets + |--------------------------------------------------------------------------- + | + | By default, Livewire automatically injects its JavaScript and CSS into the + | and of pages containing Livewire components. By disabling + | this behavior, you need to use @livewireStyles and @livewireScripts. + | + */ + + 'inject_assets' => true, + + /* + |--------------------------------------------------------------------------- + | Navigate (SPA mode) + |--------------------------------------------------------------------------- + | + | By adding `wire:navigate` to links in your Livewire application, Livewire + | will prevent the default link handling and instead request those pages + | via AJAX, creating an SPA-like effect. Configure this behavior here. + | + */ + + 'navigate' => [ + 'show_progress_bar' => true, + 'progress_bar_color' => '#2299dd', + ], + + /* + |--------------------------------------------------------------------------- + | HTML Morph Markers + |--------------------------------------------------------------------------- + | + | Livewire intelligently "morphs" existing HTML into the newly rendered HTML + | after each update. To make this process more reliable, Livewire injects + | "markers" into the rendered Blade surrounding @if, @class & @foreach. + | + */ + + 'inject_morph_markers' => true, + + /* + |--------------------------------------------------------------------------- + | Pagination Theme + |--------------------------------------------------------------------------- + | + | When enabling Livewire's pagination feature by using the `WithPagination` + | trait, Livewire will use Tailwind templates to render pagination views + | on the page. If you want Bootstrap CSS, you can specify: "bootstrap" + | + */ + + 'pagination_theme' => 'tailwind', ]; diff --git a/resources/views/portal/ninja2020/components/general/sidebar/header.blade.php b/resources/views/portal/ninja2020/components/general/sidebar/header.blade.php index b2b227c01f39..1dd4c9403232 100644 --- a/resources/views/portal/ninja2020/components/general/sidebar/header.blade.php +++ b/resources/views/portal/ninja2020/components/general/sidebar/header.blade.php @@ -33,7 +33,7 @@ @endif -
+
@elseif(!$steps['payment_required']) -
+ @csrf
@elseif($steps['show_start_trial']) -
+ @csrf
- + @csrf diff --git a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php index 82dc46a03241..22ed4940b44c 100644 --- a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php @@ -30,7 +30,7 @@ @endif - +