! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡·
! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡·
Explore posts from servers
FFilament
Created by player on 4/26/2024 in #β“β”Šhelp
Table column download spatie document file
hey @player did you fint a way to achieve that ?
4 replies
FFilament
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 8/11/2024 in #β“β”Šhelp
❓ SpatieMediaLibraryFileUpload on repeater with relation doesn't work
Here my code
// Gallery form
public function form(Form $form): Form
{
return $form
->columns(3)
->schema([
Forms\Components\TextInput::make('title') // Gallery Title
->label('Title')
->required()
->columnSpanFull()
->maxLength(255),
Forms\Components\Textarea::make('description') // Gallery Title
->label('Description')
->columnSpanFull()
->rows(3),

Forms\Components\Repeater::make('media')
->label('Images')
->columnSpanFull()
->relationship('media') // Images from my gallery
->grid(3)
->label(false)

->schema([
Forms\Components\SpatieMediaLibraryFileUpload::make('media')
->label(false)
->disk('s3-public')
->moveFiles(),
Forms\Components\TextInput::make('title')
->label(false)
->placeholder('Title')
->reactive()
->maxLength(255),
Forms\Components\Textarea::make('description')
->label(false)
->placeholder('Description')
->rows(3),
]),
]);
}
// Gallery form
public function form(Form $form): Form
{
return $form
->columns(3)
->schema([
Forms\Components\TextInput::make('title') // Gallery Title
->label('Title')
->required()
->columnSpanFull()
->maxLength(255),
Forms\Components\Textarea::make('description') // Gallery Title
->label('Description')
->columnSpanFull()
->rows(3),

Forms\Components\Repeater::make('media')
->label('Images')
->columnSpanFull()
->relationship('media') // Images from my gallery
->grid(3)
->label(false)

->schema([
Forms\Components\SpatieMediaLibraryFileUpload::make('media')
->label(false)
->disk('s3-public')
->moveFiles(),
Forms\Components\TextInput::make('title')
->label(false)
->placeholder('Title')
->reactive()
->maxLength(255),
Forms\Components\Textarea::make('description')
->label(false)
->placeholder('Description')
->rows(3),
]),
]);
}
How Can I use SpatieMediaLibraryFileUpload with my repeater ? Thanks
2 replies
FFilament
Created by limewater23 on 3/10/2024 in #β“β”Šhelp
Filament Can't Login, Shows 419 Page Expired but Shows login page CSRF token mismatch
ty
11 replies
FFilament
Created by limewater23 on 3/10/2024 in #β“β”Šhelp
Filament Can't Login, Shows 419 Page Expired but Shows login page CSRF token mismatch
Since I published the config file of livewire, everything works
11 replies
FFilament
Created by limewater23 on 3/10/2024 in #β“β”Šhelp
Filament Can't Login, Shows 419 Page Expired but Shows login page CSRF token mismatch
My issue was because livewire config files was not pubished
11 replies
FFilament
Created by limewater23 on 3/10/2024 in #β“β”Šhelp
Filament Can't Login, Shows 419 Page Expired but Shows login page CSRF token mismatch
same here, did you find any solution ?
11 replies
FFilament
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 7/26/2024 in #β“β”Šhelp
Trying to have FileUpload works with my table
Thanks for you help, i'm using mutateFormDataBeforeFill Now how can I change/overide upload and delete action ?
8 replies
FFilament
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 7/26/2024 in #β“β”Šhelp
Trying to have FileUpload works with my table
I'm in a form builder and I don't find where to use getStateUsing ?
8 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/1/2024 in #❓・help
Middleware called 3 times instead of 2 ? (stackblitz reproduction)
Here my real middleware I think you will understand
import type { FetchApiRedirectInterface } from '~/assets/js/interfaces/FetchApiRedirectInterface'

export default defineNuxtRouteMiddleware(async (to, from) => {
if (process.client && from && from.meta.key === to.meta.key) return
const nuxtApp = useNuxtApp()
if (nuxtApp.isHydrating) return

const mainResourceCategorySlug = to.params
.main_resource_category_slug as string | undefined
const resourceCategorySlug = to.params.resource_category_slug as
| string
| undefined

if (!mainResourceCategorySlug && !resourceCategorySlug) {
return
}

const categoryStore = useCategoryStore()

// Send slug to API and check if it's fine or redirection needed
const response = await useCheckResourceCategorySlug({
category_id: categoryStore.category!.id,
main_resource_category_slug: mainResourceCategorySlug,
resource_category_slug: resourceCategorySlug ?? null,
fetch_type: 'fetch', // its use useFetch here
})

const data = response.data.value as FetchApiRedirectInterface


const localePath = useLocalePath()
if (!data) {
return navigateTo(localePath('/'))
}

if (data.redirect) {
return navigateTo(localePath(data.redirect), {
redirectCode: data.code,
})
}
})
import type { FetchApiRedirectInterface } from '~/assets/js/interfaces/FetchApiRedirectInterface'

export default defineNuxtRouteMiddleware(async (to, from) => {
if (process.client && from && from.meta.key === to.meta.key) return
const nuxtApp = useNuxtApp()
if (nuxtApp.isHydrating) return

const mainResourceCategorySlug = to.params
.main_resource_category_slug as string | undefined
const resourceCategorySlug = to.params.resource_category_slug as
| string
| undefined

if (!mainResourceCategorySlug && !resourceCategorySlug) {
return
}

const categoryStore = useCategoryStore()

// Send slug to API and check if it's fine or redirection needed
const response = await useCheckResourceCategorySlug({
category_id: categoryStore.category!.id,
main_resource_category_slug: mainResourceCategorySlug,
resource_category_slug: resourceCategorySlug ?? null,
fetch_type: 'fetch', // its use useFetch here
})

const data = response.data.value as FetchApiRedirectInterface


const localePath = useLocalePath()
if (!data) {
return navigateTo(localePath('/'))
}

if (data.redirect) {
return navigateTo(localePath(data.redirect), {
redirectCode: data.code,
})
}
})
When i try to go on a page with wrong slugs, here this middleware is calling 3 times. If I put everything here in my setup page instead of here my middleware, api is called only two times
15 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/1/2024 in #❓・help
Middleware called 3 times instead of 2 ? (stackblitz reproduction)
My middleware is making an api request to check slugs in the link. If I put this logic in my middleware, it does 3 API calls. If I put this logic in page setup, only two (as intended). What i'm understing in Nuxt, middleware shouldn't be used If I have redirection and API call ? If I use middleware for that atm, it does one more call for nothing
15 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/1/2024 in #❓・help
Middleware called 3 times instead of 2 ? (stackblitz reproduction)
Like it works If I put the script in the setup instead of the middleware
15 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/1/2024 in #❓・help
Middleware called 3 times instead of 2 ? (stackblitz reproduction)
Only A is hard loading. It should be A -> A -> Middleware -> Redirecting to B -> Middleware -> Showing B
15 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/1/2024 in #❓・help
Middleware called 3 times instead of 2 ? (stackblitz reproduction)
.
15 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/1/2024 in #❓・help
Middleware called 3 times instead of 2 ? (stackblitz reproduction)
I updated nuxt to 3.11.1 and same issue here https://stackblitz.com/edit/github-3enzca-ixdqzf
15 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/1/2024 in #❓・help
Middleware called 3 times instead of 2 ? (stackblitz reproduction)
Issue still here
15 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 4/1/2024 in #❓・help
Middleware called 3 times instead of 2 ? (stackblitz reproduction)
Ill update reproduction but atm in my local project i have the last vr
15 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 3/1/2024 in #❓・help
Hydratation issue using pinia store (stackblitz reproduction)
I solve it in a different way but I don't remember on how i did it
4 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 3/25/2024 in #❓・help
Nested routes but not for all pages
No description
2 replies
NNuxt
Created by ! GhostvOne.tv πŸ‘»πŸ‡«πŸ‡· on 3/11/2024 in #❓・help
[useFetch] Component is already mounted, please use $fetch instead (in middleware)
.
10 replies