Runway gives you the option of displaying & managing your Eloquent models in Statamic sites.
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.php
return [
'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:products }}
<h2>{{ name }}</h2>
<p>Price: {{ price }}</p>
{{ /runway:products }}
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 {
id
name
price
description
}
}
}
First, require Runway as a Composer dependency:
composer require doublethreedigital/runway
Once installed, you’ll want to publish the default configuration file.
php artisan vendor:publish --tag="runway-config"
Now, configure each of the 'resources' you'd like to be available through Runway.
There's full documentation of Runway over on it's documentation site.
This addon is open-source, meaning anyone can use this addon in their sites for free!
However, maintaining and developing new features for open-source projects can take quite a bit of time. If you're using Runway in your production environment, please consider sponsoring me (Duncan McClean) for a couple dollars a month.
Only the latest version of Runway (v2.1) will receive security updates if a vulnerability is found.
If you discover a security vulnerability, please report it to Duncan straight away, via email. Please don't report security issues through GitHub Issues.