Contentful logo

Contentful Community

What limitations have you found using contenful in a php framework regarding new pages

I’m trying to get an idea if contentful can meet my needs. I have been able to render some content in the front end of a laravel application, from contentful using the SDK.

However from what I understand, in terms of CMS the content, it can only be rendered in a page which has already been created with routing in the MVC framework. Something like drupal or wordpress would enable me to create new pages and routing. Contentful can only enable changing content or images, and also has textrich feature to able some custom html tags, however if a person wants to add a new page from my team, I would have to add that in laravel, then add the relevant calls to the id of specific content.

Am I missing something or is this the limitation of headless CMS?

Hi @gavin,

You don’t necessarily have to have a fixed route in your application for every corresponding Contentful entry. You can use, for example, the slug field type to generate a URL-slug from your entry’s title and have the route to match that.

Let’s assume your Laravel application has a route called /pages/{slug} where the {slug} corresponds to any possible URL slug value. When someone requests, for example, the URL /pages/my-test-page you can use the Contentful Delivery API SDK to query entries that has a slug field with the matching value my-test-page.

That’s great it works, many thanks for your insight