= ? AND DATE(created_at) <= ? GROUP BY DATE(created_at), hittype ORDER BY created_at ASC', [ $start, $end ]); return $result; } catch (Exception $e) { throw $e; } } /** * Get initial start date * * @return string */ public static function getInitialStartDate() { $data = HitsModel::raw('SELECT created_at FROM `' . self::tableName() . '` WHERE id = 1')->first(); return $data->get('created_at'); } /** * Return the associated table name of the migration * * @return string */ public static function tableName() { return 'hits'; } }