A Flat-File Database Driver for Eloquent
Published on by Paul Redmond
Orbit is a flat-file database driver for Eloquent by Ryan Chandler.
Introducing `Orbit` - a flat-file database driver for @laravelphp Eloquent.https://t.co/gBpgBFUo5M https://t.co/HaxOomChv6
— Ryan Chandler (@ryangjchandler) March 21, 2021
You can think of it as a general-purpose "flat-file CMS for any of your applications." It can be added to any Laravel Model class and allows you to store data in flat files on a disk.
Here's an example from the readme of defining a model for usage with Orbit:
use Illuminate\Database\Schema\Blueprint; class Post extends Model{ use \Orbit\Concerns\Orbital; public static function schema(Blueprint $table) { $table->string('title'); $table->string('slug'); $table->timestamp('published_at'); }}
Orbit is a simple-to-use package that can add flat-file support to any Laravel model class. It allows you to store data in flat files on disk instead of a generic SQL database. Think of it as a general-purpose flat-file CMS for any of your applications!
Getting started is straightforward: given the above model, here's what the flat files look like in a project:
The screenshot is an example of the markdown driver; in Orbit it supports the following drivers out of the box:
-
md
->Orbit\Drivers\Markdown
-
json
->Orbit\Drivers\Json
-
yaml
->Orbit\Drivers\Yaml
-
md_json
->Orbit\Drivers\MarkdownJson
You are free to define custom drivers using the given interface contained in the Orbit package.
Learn More
You can learn more about this package, get full installation instructions, and view the source code on GitHub.
Also, Ryan has recently started a 60 second Laravel series on YouTube to teach you things about Laravel in 60 seconds or less. Check out the first one here: