private function getStartEndDate()
    {
        $start = input('start', date('Y-m-d', strtotime('-29 days')));
        $end = input('end', date('Y-m-d'));

        if (is_string($start)) {
            $start = \DateTime::createFromFormat('Y-m-d', $start);
        }

        if (is_string($end)) {
            $end = \DateTime::createFromFormat('Y-m-d', $end);
        }

        return compact('start', 'end');
    }
private function getStartEndDate()
    {
        $start = input('start', date('Y-m-d', strtotime('-29 days')));
        $end = input('end', date('Y-m-d'));

        if (is_string($start)) {
            $start = \DateTime::createFromFormat('Y-m-d', $start);
        }

        if (is_string($end)) {
            $end = \DateTime::createFromFormat('Y-m-d', $end);
        }

        return compact('start', 'end');
    }
private function getStartEndDate ( ) { $ start = input ( 'start' , date ( 'Y-m-d' , strtotime ( '-29 days' ) ) ) ; $ end = input ( 'end' , date ( 'Y-m-d' ) ) ; if ( is_string ( $ start ) ) { $ start = \ DateTime :: createFromFormat ( 'Y-m-d' , $ start ) ; } if ( is_string ( $ end ) ) { $ end = \ DateTime :: createFromFormat ( 'Y-m-d' , $ end ) ; } return compact ( 'start' , 'end' ) ; }
Get the start and end duration
@return array
Get the start and end duration