FusionCMS is currently in an open beta state and under heavy active development.

Matrices

Introduction

Retrieving Models

Once you have created a matrix, you are ready to start receiving data from your database. Behind the scenes, Fusion will generate and connect a dedicated Eloquent model class for your matrix to its generated database table. Because of this, querying matrix entries and pages is handled natively by Eloquent.

Resolving Model Instances

Because the Eloquent model associated with matrices is generated on the fly, you will need to resolve the model instance through the Builder. Just pass through the handle of the matrix you'd like to resolve:

$model = new \App\Services\Builders\Collection('flights');

Once retrieved, you will have a fresh Eloquent model instance ready to be queried:

$flights = $model->where('active', 1)
    ->orderBy('name', 'desc')
    ->take(10)
    ->get();
Have questions?

We're always happy to help with code or other questions you might have. Contact support or chat live with us on Discord.

Last edited on Thursday, December 12, 2019 (1 year ago)