Spatie\Analytics\Period::create PHP Method

create() public static method

public static create ( DateTime $startDate, $endDate ) : Period
$startDate DateTime
return Period
    public static function create(DateTime $startDate, $endDate) : Period
    {
        return new static($startDate, $endDate);
    }

Usage Example

 /**
  * DashboardController constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $end = Carbon::now()->minute(0);
     $this->limit = 16;
     $this->period = Period::create($end->copy()->subDays(30), $end);
     $this->country = env('ANALYTICS_COUNTRY');
 }
All Usage Examples Of Spatie\Analytics\Period::create