Runway fits right into the Control Panel - enabling you to create, edit and view your models. In most cases, you'll not notice the difference between an entry in the CP and an Eloquent model in the CP.
Need to show your models on the front-end of your site? No problem - Runway's got that under control. Simply tell Runway the route you'd like to use and it'll serve up the front-end for you.
// config/runway.phpreturn ['resources' => [\App\Models\Product::class => ['route' => '/products/{{ slug }}',],],];
// config/runway.phpreturn ['resources' => [\App\Models\Product::class => ['route' => '/products/{{ slug }}',],],];
In addition to front-end routing, you may also use Runway's tag to loop through your models and display the results. The tag supports filtering, using Eloquent scopes and sorting.
{{ runway:product }}<h2>{{ name }}</h2><p>Price: {{ price }}</p>{{ /runway:product }}
{{ runway:product }}<h2>{{ name }}</h2><p>Price: {{ price }}</p>{{ /runway:product }}
If you're a GraphQL fan, you're now able to fetch your models via GraphQL. Runway will augment the fields just like you'd expect.
{products(limit: 25, sort: "name") {data {idnamepricedescription}}}
{products(limit: 25, sort: "name") {data {idnamepricedescription}}}
If you don't like GraphQL and would prefer plain old REST, you can do that too. Runway easily integrates with Statamic's REST API.
'resources' => ['collections' => true,// ...'runway' => ['product' => true,],],
'resources' => ['collections' => true,// ...'runway' => ['product' => true,],],