Skip to content

Eloquent listing issue on empty table #4

Closed
@terion-name

Description

@terion-name

When table is empty

Route::api(['version' => 'v1', 'prefix' => 'api'], function()
{
    Route::get('users', function()
    {
        return User::all();
    });
});

Results in:

Call to a member function getTable() on a non-object
/vendor/dingo/api/src/Http/Response.php:97

PS

What is the sense in setting a key in plural of table name? It is not the most convenient thing... It would more simple and transparent if collections would be wrapped in simple data object.. This also would be compatible with laravel paginator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions