Download the PHP package timothepearce/laravel-quasar without Composer
On this page you can find all versions of the php package timothepearce/laravel-quasar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download timothepearce/laravel-quasar
More information about timothepearce/laravel-quasar
Files in timothepearce/laravel-quasar
Package laravel-quasar
Short Description Laravel Time Series provides an API to create and maintain projected data from you Eloquent models, and represent them as time-series.
License MIT
Homepage https://github.com/timothepearce/laravel-time-series
Informations about the package laravel-quasar
Build your time series with ease
About
Laravel Time Series provides an API to projects data from your Eloquent models, and convert them to time series.
Documentation
The full documentation can be found here.
Usage
Installation
Migrate the tables
Create a Projection
Make a model projectable
When you want to make your model projectable, you must add it the Projectable
trait and define the $projections
class attribute:
Implement a Projection
When you're implementing a projection, follow theses three steps:
Query a Projection
A Projection is an Eloquent model and is queried the same way, but keep in mind that the projections are all stored in a single table. That means you'll have to use scope methods to get the correct projections regarding the period you defined earlier:
Query a time series
To get a time series from a projection model, use the toTimeSeries method:
Note that this method fill the missing projections between the given dates with the default content you defined earlier.
Credits
License
The MIT License (MIT). Please see License File for more information.