Skip to content

Commit 64b2fe1

Browse files
committed
fix routes to use regular
1 parent ce0dff7 commit 64b2fe1

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "justd/laravel",
3-
"version": "1.4.14",
3+
"version": "1.4.15",
44
"type": "project",
55
"description": "The skeleton application for the Laravel framework.",
66
"keywords": [

resources/js/layouts/app-navbar.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ export function AppNavbar({ children, ...props }: React.ComponentProps<typeof Na
122122
intent: "outline",
123123
size: "small",
124124
})}
125-
href={route("login")}
125+
href="/login"
126126
>
127127
Login
128128
</Link>
129-
<Navbar.Item href={route("register")}>Register</Navbar.Item>
129+
<Navbar.Item href="/register">Register</Navbar.Item>
130130
</>
131131
)}
132132
</Navbar.Section>
@@ -152,7 +152,7 @@ export function AppNavbar({ children, ...props }: React.ComponentProps<typeof Na
152152
size: "small",
153153
shape: "circle",
154154
})}
155-
href={route("login")}
155+
href="/login"
156156
>
157157
Login
158158
</Link>
@@ -193,10 +193,10 @@ function UserMenu() {
193193
</div>
194194
</Menu.Header>
195195
</Menu.Section>
196-
<Menu.Item href={route("dashboard")}>
196+
<Menu.Item href="/dashboard">
197197
<Menu.Label>Dashboard</Menu.Label>
198198
</Menu.Item>
199-
<Menu.Item href={route("profile.edit")} className="justify-between">
199+
<Menu.Item href="/profile" className="justify-between">
200200
<Menu.Label>Settings</Menu.Label>
201201
<IconSettings />
202202
</Menu.Item>
@@ -236,7 +236,7 @@ function UserMenu() {
236236
<IconBrandJustdBlocks />
237237
</Menu.Item>
238238
<Menu.Separator />
239-
<Menu.Item routerOptions={{ method: "post" }} href={route("logout")}>
239+
<Menu.Item routerOptions={{ method: "post" }} href="/logout">
240240
<Menu.Label>Logout</Menu.Label>
241241
<IconLogout />
242242
</Menu.Item>

resources/js/layouts/guest-layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function GuestLayout({
1717
return (
1818
<div className="flex min-h-screen flex-col items-center pt-6 sm:justify-center sm:pt-0">
1919
<Flash />
20-
<Link href={route("home")}>
20+
<Link href="/">
2121
<Logo className="size-6" />
2222
</Link>
2323

resources/js/pages/auth/confirm-password.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function ConfirmPassword() {
1717
const submit = (e: { preventDefault: () => void }) => {
1818
e.preventDefault()
1919

20-
post(route("password.confirm"))
20+
post("/confirm-password")
2121
}
2222

2323
return (

resources/js/pages/auth/login.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function Login(args: LoginProps) {
2626
const submit = (e: { preventDefault: () => void }) => {
2727
e.preventDefault()
2828

29-
post(route("login"))
29+
post("/login")
3030
}
3131

3232
return (
@@ -74,7 +74,7 @@ export default function Login(args: LoginProps) {
7474
Log in
7575
</Button>
7676
<div className="text-center">
77-
<Link href={route("register")} className="sm:text-sm" intent="secondary">
77+
<Link href="/register" className="sm:text-sm" intent="secondary">
7878
Dont have account? Register
7979
</Link>
8080
</div>

resources/js/pages/profile/partials/delete-user-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function DeleteUserForm() {
2121
}
2222

2323
const deleteUser = () => {
24-
destroy(route("profile.destroy"), {
24+
destroy("/profile", {
2525
preserveScroll: true,
2626
onSuccess: () => closeModal(),
2727
onFinish: () => reset(),

resources/js/pages/profile/partials/update-password-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function UpdatePasswordForm() {
1414

1515
const submit = (e: { preventDefault: () => void }) => {
1616
e.preventDefault()
17-
put(route("password.update"), {
17+
put("/password", {
1818
preserveScroll: true,
1919
onSuccess: () => {
2020
toast.success("Your profile information has been updated.")

resources/js/pages/profile/partials/update-profile-information-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function UpdateProfileInformationForm({ mustVerifyEmail, status, classNam
1717

1818
const submit = (e: { preventDefault: () => void }) => {
1919
e.preventDefault()
20-
patch(route("profile.update"), {
20+
patch("/profile", {
2121
preserveScroll: true,
2222
})
2323
}
@@ -59,7 +59,7 @@ export function UpdateProfileInformationForm({ mustVerifyEmail, status, classNam
5959
<p className="mt-2 text-sm">
6060
Your email address is unverified.
6161
<Link
62-
href={route("verification.send")}
62+
href="/email/verification-notification"
6363
intent="secondary"
6464
routerOptions={{
6565
method: "post",

0 commit comments

Comments
 (0)