Skip to content

An unknown Strapi error was returned while calling Route http://127.0.0.1:8000/test/2 #16

@bast111

Description

@bast111

Discussed in #15

Originally posted by bast111 April 6, 2022
Hi guys, being fairly new to Laravel i wanted to start implement a strapi backend following that tutorial here

All worked fine at first, I created a route to fetch all my localites

Route::get('/test', function () {
    $strapi = new LaravelStrapi();
    return $localites = $strapi->collection('api/localites');
});

image

So I kept going and tried to create the route for one item

//Route pour 1 localite
Route::get('/test/{id}', function ($id) {
    $strapi = new LaravelStrapi();
    return $localites = $strapi->entry('api/localites', $id);
});

And this is what I get :
image

I can see that the api has been called successfully but I don't understand what is the problem
image

If anyonce can give me some insights would be really appreciated :) Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions