13

I am building a system that uses Laravel Nova for managing resources.

There are a couple of instances where I want non-admin users to be able to create resources. The ideal solution would be to define the resource in Nova and embed Nova's own create form on the front end of the site.

Has anyone done anything similar, or have any suggestions how to go about this?

2
  • 3
    What about giving users access to nova backend and setup Laravel policies to let them access and create only those few resources that you want? Commented Feb 15, 2020 at 17:05
  • That's not going to cut it unfortunately - it would be a very odd user journey for people to suddenly find themselves in the Nova backend. Commented Feb 17, 2020 at 13:03

1 Answer 1

1

I believe you can use the same endpoints that Nova is using.

For example to get all the fields of a resource:

GET updating fields: http://{url}/nova-api/{resource}/{id}/?editing=true&editMode=update

GET creation fields: http://{resource}/nova-api/{resource}/creation-fields?editing=true&editMode=create=

After the user has filled out the fields, you can use this endpoint to save the new values:

PUT: http://{url}/nova-api/{resource}/{id}

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.