Skip to content

andrewdyer/date-expression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Date Expression

A utility that can be used to create raw query date expressions for MySQL or SQLite Laravel databases.

Total Downloads Latest Stable Version License

License

Licensed under MIT. Totally free for private or commercial projects.

Installation

composer require andrewdyer/date-expression

Usage

use Anddye\DateExpression\DateExpressionFactory;

$dateExpression = DateExpressionFactory::create($query, $column, $unit);

$value = $dateExpression->getValue();

Function Arguments

Name Type Description
$query Illuminate\Database\Eloquent\Builder The query builder being used to build the trend.
$column string The column being measured.
$unit string The unit being measured. Supported values include; "daily", "monthly" or "weekly"

Support

If you're using this package, I'd love to hear your thoughts! Feel free to contact me on Twitter.

Found a bug? Please report it using the issue tracker, or better yet, fork the repository and submit a pull request.

About

A utility that can be used to create raw query date expressions for MySQL or SQLite Laravel databases

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages