Laravel Nova Api Management

Posted on by  admin
Laravel Nova Api Management Rating: 9,2/10 7039 votes

Join GitHub today

GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.

What is Laravel Nova? Laravel Nova is the admin panel for Laravel that was first introduced at Laracon Us 2018 by Taylor Otwell. It’s beautiful and easy to work with. Nova allows you to easily manage resources, create your own filters or actions, and many things cool stuff.

Sign up 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.

Laravel Nova Packages

  1. Sep 6, 2018 - Furthermore, Laravel Nova was also released. In this article. Securing Laravel APIs with Auth0 is very easy and brings a lot of great features to the table. You'll need an Auth0 account to manage authentication.
  2. A collection of web projects made with Laravel – Websites, Components, Frameworks, Apps and more!

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

Comments

Laravel nova free

commented Jan 17, 2019
edited

Hello,

i've encountered following issue today. Im working on that project for a couple of weeks and have used many more resources already that worked perfectly fine.

Today i created a Resource called 'Dataimport' with the following steps:

  • php artisan make:model Dataimport -m (did a standard migration with just a string and an integer)
  • php artisan nova:resource Dataimport
  • i just added basic functionality to the Dataimport Resource like the two fields for the columns

When i try to create a resource in my local backend i get a console error
http://clcrawler.local/nova-api/dataimports 404 (Not Found)
When i manually open this link (http://clcrawler.local/nova-api/dataimports) it shows just this:
{'label':'Dataimports','resources':[],'prev_page_url':null,'next_page_url':null,'softDeletes':false}

All other resources in the same project work perfectly fine. It just happened with this new ressource.
Im on the newest laravel nova installation and on laravel 5.7.21

thanks for help in advance!

Edit: I just redid the whole process from scratch and named the resources slightly different and it works again. Dunno what happened there but at least i could work around my problem like that.

commented Jan 17, 2019

NovaNova

im not the most experienced developer so im always i afraid i miss a very obvious thing.
Ive tried following things:

  • config:clear, cache:clear
  • created other resources (while http://clcrawler.local/nova-api/dataimports returns 404 when trying to create a ressource, a different resource named artist returns 203 and it works fine http://clcrawler.local/nova-api/artists)

it seems like that the api for some reason didnt recognize that i have a new resource or something like that? or did i screw up the create form process in some way? i mean i really didnt do something special. Just standard form fields in the resource after creating the model, migration and resource:

return [
ID::make()->hideFromIndex(),
Text::make('Resource')->sortable(),
Text::make('Import Class')->sortable()->hideFromIndex(),
];

commented Jan 17, 2019
edited

I think there is a bug / conflict with field name 'Resource'. when i use 'Resource' as a field, i also get 404 error when creating a new resource.

Please try to edit your database table field name as 'resource_name'. it should work

commented Jan 17, 2019

I just gave this a shot and am not able to replicate the issue with any of your setups. If you can find a way to reliably produce this issue, please post the details and I'll reopen.

commented Apr 13, 2019

I also am experiencing a similar issue, after creating a resource in Nova I get directed to the 404 page. In my case my Resource is called 'Member'.

Console:

GET http://127.0.0.1:8000/nova-api/members/undefined 404 (Not Found)

Logged in there is:

'message': 'No query results for model [AppMember].',

It's a tricky one, will see if I can actually replicate it again to give more details.

commented Apr 13, 2019
edited

Just a quick update, I was actually able to stop the 404 redirecting by removing the notification on my model, the following was removed from the non Nova model:

static::creating(function ($member) {
Notification::send($member, new MemberUpdated($member));
});

public function routeNotificationFor($notification)
{
return 'https://hooks.slack.com/services/';
}

@dajoeberlei did you have a notification on the model? Or hooking into the creation service?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Comments are closed.