kharanenka / laravel-scope-date by Andrey Kharanenka

Scope for date field (Carbon)
31,666
1
2
Package Data
Maintainer Username: Andrey Kharanenka
Maintainer Contact: kharanenka@gmail.com (Andrey Kharanenka)
Package Create Date: 2016-11-12
Package Last Update: 2016-11-12
Language: PHP
License: GPL-3.0
Last Refreshed: 2024-11-20 03:02:11
Package Statistics
Total Downloads: 31,666
Monthly Downloads: 402
Daily Downloads: 7
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Trait DateField

You can use trait in your models with date field (Carbon)

#Installation Require this package in your composer.json and update composer.


"kharanenka/laravel-scope-date": "1.0.*"

Usage

    
    class MyModel extend Model {
    
        use Kharanenka\Scope\DateField;
    
        ...
    
    }
    
    $obElement = MyModel::getByDateValue('created_at', '2016-02-06', '>=')->first();
    $sDate = $obElement->getDateValue('created_at', 'd.m.Y');