Comments (5)
Thanks all, please try v2.0.2 now and see if fixed?
from laravel-strapi.
I have the exact same problem, which is caused by line 98 of the LaravelStrapi.php vendor class:
if (!isset($entry['id'])) {
Cache::forget($cacheKey);
if (null === $entry) {
throw new NotFound('The requested single entry (' . $type . ') was null');
}
throw new UnknownError('An unknown Strapi error was returned');
}
As we can see in the screenshot postet above, the data returned via the API has a key "data" at the root level of the response. It seems the check for the entry in the LaravelStrapi.php class is not aware of that and only checks for the key "id", but lacks check of the "data" key. I changed this to:
if (!isset($entry['data']['id'])) {
and that resolves the problem, but is still a change in the vendor-file...
from laravel-strapi.
Tested & works! Thank you very much!
from laravel-strapi.
Amazing guys Thx for the fix it now works fine!
I do have another problem tho reaching the end of the tutorial.
I did a Route calling the Localite function in the LocaliteController. which return the localites.blade.php view... so far everything works fine
But when trying to access the fields from my Strapi object like the 'nom' or 'npa' it can't be found even id.
Could anyone enlight me please :D
from laravel-strapi.
Here's a var_dump of the localite variable
from laravel-strapi.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-strapi.