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

Nova 4.0 #33

Open
Sonicelo opened this issue Jun 2, 2022 · 11 comments
Open

Nova 4.0 #33

Sonicelo opened this issue Jun 2, 2022 · 11 comments

Comments

@Sonicelo
Copy link

Sonicelo commented Jun 2, 2022

Hey, any chance to update this package to Nova 4.0?
The issue is the TextWithSlug field does not show up on any screen.

@samdharris
Copy link

Hi There, any update on this?

@sanderbaas
Copy link

In the meanwhile you could use the new native depensOn to create a replacement for the functionality of this package:

Text::make(__('Name'), 'name'),

Text::make(__('Slug'), 'slug')
    ->dependsOn(
        ['name'],
        function(Text $field, NovaRequest $request, FormData $formData) {
            if ($formData->name <> optional($request->resource()::find($request->resourceId))->name) {
                $field->value = Str::slug($formData->name);
                $field->help(config('app.url') . '/categories/' . $field->value);
            }
        }
    ),

@tomhatzer
Copy link
Owner

Hi all!

I don't have a nova 4 license yet, so am not able to test it.
If anyone wants to provide a PR, you are very welcome to.

Thank you very much and have a great day!

@jmverges
Copy link

jmverges commented Feb 6, 2023

+1

@jmverges
Copy link

jmverges commented Feb 6, 2023

@sanderbaas That example doesn't work as I would expect NovaSlugField works but thanks for the snippet
@tomhatzer did you get a license?

@jmverges
Copy link

jmverges commented Feb 7, 2023

@tomhatzer I just openend a PR that works well.

@GingerNinjaNicko
Copy link

GingerNinjaNicko commented Mar 20, 2023

I think this functionality is now part of Nova 4: https://nova.laravel.com/docs/4.0/resources/fields.html#slug-field

@juergenZeindlinger
Copy link

@tomhatzer any update on that PR? 🤔

@tomhatzer
Copy link
Owner

@juergenZeindlinger if you can test it and can confirm that it works I‘m willing to approve and merge it :) I don‘t work with Nova anymore and don‘t have a license for v4.

@juergenZeindlinger
Copy link

@tomhatzer I can't but @jmverges mentioned that his PR works well 🤔 Don't know

@andrewtweber
Copy link

I think this functionality is now part of Nova 4: https://nova.laravel.com/docs/4.0/resources/fields.html#slug-field

Thanks for that, yep Nova 4 supports 95% of the functionality of this package out of the box. The only differences I can see are that disableAutoUpdateWhenUpdating is enabled by default, with no way to turn it off (I prefer it enabled anyways). And the slug generation is debounced and not as responsive, but I can live with that.

Anyways thank you to the maintainers of this package for providing it for Nova 3 for many years 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants