-
I think this is duplicate code that can be remove. Caused me issues trying to overwrite the unique query: TitleWithSlugInput::make(
urlPath: fn(?Model $record) => ($record ? $record->parents_path : '') . '/',
fieldTitle: 'title',
fieldSlug: 'slug',
slugRuleUniqueParameters: [
'callback' => fn(Unique $rule, \Closure $get) => $rule->whereIn('page_id', function (Builder $query) use ($get) {
$query->select('page_contents.page_id')
->from('page_contents')
->join('pages', 'page_contents.page_id', '=', 'pages.id')
->when($get('language_id'), fn() => $query->where('language_id', $get('language_id')))
->where('parent_id', $get('../parent_id') ?: null);
}),
'ignorable' => fn(?Model $record) => $record,
],
) |
Beta Was this translation helpful? Give feedback.
Answered by
camya
Nov 11, 2022
Replies: 1 comment 1 reply
-
Good find. I will remove it in the next release. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
howdu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good find. I will remove it in the next release.