English 中文(简体)
Laravel Filament - how to swap out “record” id in a “{record}/edit” path
原标题:Laravel Filament - how to swap out the "record" id in a "/{record}/edit" route

我已经制定了标准清单,建立了记录页码。 领馆通过行车将路线连接起来,通过持地人进行“记录:

public static function getPages(): array
{
    return [
         index  => PagesListUserFamilies::route( / ),
         create  => PagesCreateUserFamilies::route( /create ),
         edit  => PagesEditUserFamilies::route( /{record}/edit ),
    ];
}

......在这种情况下,用户Id将采用“记录”。 然而,由于关系数据库比较复杂,我不想通过该数据库,我想以不同的价值通过。 我如何把这一价值转过来? 页: 1

public static function getPages(): array
{
    return [
         index  => PagesListUserFamilies::route( / ),
         create  => PagesCreateUserFamilies::route( /create ),
         edit  => PagesEditUserFamilies::route( /{someothervalue}/edit ),
    ];
}

感谢

问题回答

或许这个职位可以帮助或启发你:





相关问题
表格过滤能力问题

我想,当我过滤一个桌子与他人轻易分享时,《URL》就列入一个问讯。 我观看了显示这一特征的共享录像,我对我如何能够......感到怀疑。

Is it possible to make a Filament (version 2) Action reactive?

Can I get a Filament (v2) Action to refresh the whole page, or at least update a Navigation Badge? I ve got a table of Recipes, and I ve got a Single Action on that recipe table, which adds the recipe ...

Filament Many To Many Relation Manager , not working

I have the model Student Student groups : BelongsToMany and model Group Group students: HasMany of course there is a pivot table group_student with group_id student_id I am trying, in Filament3, ...

热门标签