Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Ziggy v2 #359

Merged
merged 2 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Console/InstallsInertiaStacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait InstallsInertiaStacks
protected function installInertiaVueStack()
{
// Install Inertia...
if (! $this->requireComposerPackages(['inertiajs/inertia-laravel:^0.6.8', 'laravel/sanctum:^3.2', 'tightenco/ziggy:^1.0'])) {
if (! $this->requireComposerPackages(['inertiajs/inertia-laravel:^0.6.8', 'laravel/sanctum:^3.2', 'tightenco/ziggy:^2.0'])) {
return 1;
}

Expand Down Expand Up @@ -179,7 +179,7 @@ protected function installInertiaVueSsrStack()
protected function installInertiaReactStack()
{
// Install Inertia...
if (! $this->requireComposerPackages(['inertiajs/inertia-laravel:^0.6.3', 'laravel/sanctum:^3.2', 'tightenco/ziggy:^1.0'])) {
if (! $this->requireComposerPackages(['inertiajs/inertia-laravel:^0.6.3', 'laravel/sanctum:^3.2', 'tightenco/ziggy:^2.0'])) {
return 1;
}

Expand Down Expand Up @@ -349,7 +349,7 @@ protected function configureZiggyForSsr()
EOT,
<<<'EOT'
use Inertia\Middleware;
use Tightenco\Ziggy\Ziggy;
use Tighten\Ziggy\Ziggy;
EOT,
app_path('Http/Middleware/HandleInertiaRequests.php')
);
Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia-react-ts/resources/js/ssr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ReactDOMServer from 'react-dom/server';
import { createInertiaApp } from '@inertiajs/react';
import createServer from '@inertiajs/react/server';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import route from '../../vendor/tightenco/ziggy/dist/index.m';
import { route } from '../../vendor/tightenco/ziggy';
import { RouteName } from 'ziggy-js';

const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia-react-ts/resources/js/types/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AxiosInstance } from 'axios';
import ziggyRoute from 'ziggy-js';
import { route as ziggyRoute } from 'ziggy-js';

declare global {
interface Window {
Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/ssr.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ReactDOMServer from 'react-dom/server';
import { createInertiaApp } from '@inertiajs/react';
import createServer from '@inertiajs/react/server';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import route from '../../vendor/tightenco/ziggy/dist/index.m';
import { route } from '../../vendor/tightenco/ziggy';

const appName = import.meta.env.VITE_APP_NAME || 'Laravel';

Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia-vue-ts/resources/js/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../css/app.css';
import { createApp, h, DefineComponent } from 'vue';
import { createInertiaApp } from '@inertiajs/vue3';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
import { ZiggyVue } from '../../vendor/tightenco/ziggy';

const appName = import.meta.env.VITE_APP_NAME || 'Laravel';

Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia-vue-ts/resources/js/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { renderToString } from '@vue/server-renderer';
import { createInertiaApp } from '@inertiajs/vue3';
import createServer from '@inertiajs/vue3/server';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
import { ZiggyVue } from '../../vendor/tightenco/ziggy';

const appName = import.meta.env.VITE_APP_NAME || 'Laravel';

Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia-vue-ts/resources/js/types/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PageProps as InertiaPageProps } from '@inertiajs/core';
import { AxiosInstance } from 'axios';
import ziggyRoute from 'ziggy-js';
import { route as ziggyRoute } from 'ziggy-js';
import { PageProps as AppPageProps } from './';

declare global {
Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../css/app.css';
import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/vue3';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
import { ZiggyVue } from '../../vendor/tightenco/ziggy';

const appName = import.meta.env.VITE_APP_NAME || 'Laravel';

Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { renderToString } from '@vue/server-renderer';
import { createInertiaApp } from '@inertiajs/vue3';
import createServer from '@inertiajs/vue3/server';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
import { ZiggyVue } from '../../vendor/tightenco/ziggy';

const appName = import.meta.env.VITE_APP_NAME || 'Laravel';

Expand Down
Loading