Skip to content

Why id is used in the Repository delete method #11

Open
@clarkwinkelmann

Description

@clarkwinkelmann

A model reference is used to update, but only the id is given to delete.

There's even a find call to check the model exists in the controller https://github.com/gravure/laravel-json-api/blob/master/src/Controllers/ResourceController.php#L91

What's the reason behind sending only the id as parameter ? In order to use Eloquent's delete method we need to run find a second time !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions