dbfx / laravel-strapi Goto Github PK
View Code? Open in Web Editor NEWLaravel wrapper for using the Strapi headless CMS
Home Page: https://blakey.co
License: MIT License
Laravel wrapper for using the Strapi headless CMS
Home Page: https://blakey.co
License: MIT License
By default they all point to https://github.com/vendor_slugpackage_slug/issues/new
when really they should be https://github.com/dbfx/laravel-strapi/issues/new
When creating new commits the various tools that run over the code before a commit default to PHP 7.4 and cause the checks to fail because there are features in the code that PHP 7.4 doesn't support (Union types for example.
Also, PHP 7.4 has been end of life since 2022, is it really worth the effort to maintain compatability at the expense of new features?
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');
});
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);
});
I can see that the api has been called successfully but I don't understand what is the problem
If anyonce can give me some insights would be really appreciated :) Thanks
Installed version: v4.0.1
The cache key is using the encrypt()
function which returns every time a different hash string in all the LaravelStrapi class methods,
$cacheKey = self::CACHE_KEY.'.'.__FUNCTION__.'.'.encrypt($endpoint);
The cache::remember
always stores in the cache the same request but with a different $cacheKey
Proposal to fix the bug:
$cacheKey = md5(self::CACHE_KEY . '.' . __FUNCTION__ . '.' . $endpoint);
$cacheKey = sha1(self::CACHE_KEY . '.' . __FUNCTION__ . '.' . $endpoint);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.