Skip to content Docs index for AI agents (llms.txt)
Laravel
1.0

Versions

Getting StartedRequesting Pages

Requesting Pages

Methods for querying stories, folders, and relations from Storyblok in Laravel.

Updated by Ric Le Poidevinf2f03b71 min read


Pages in Storyblok can be requested via their slug or UUID. If using the catch-all route we do the following which returns a view:

php
public function show($slug = 'home')
{
	return Storyblok::bySlug($slug)->read()->render();
}

If you want to return the Page without rendering it just skip the render() method and it’ll give you the Page object which you can then manipulate or pass to a view.

php
Storyblok::bySlug('the-story-of-pusskin')->read();

Or by UUID:

php
Storyblok::byUuid('12345678-1234-1234-1234-123456789012')->read();