-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class 'Kurt\Google\Analytics\Exceptions\InvalidPeriodException' not found #8
Comments
1- Can you please provide which dates you entered to the constructor? 2- Sadly, the google analytics API returns the months starting from 0. It's confusing but it's how it is. ✌️ |
is it what you meant? |
Yes thanks, your input is correct, I will check where the problem is and return as soon as possible.
Thanks.
Ozan Kurt
… On 28 Jan 2017, at 11:38, Badwi ***@***.***> wrote:
private $ga;
function __construct(GoogleAnalytics $ga) {
$this->middleware('auth');
$this->ga = $ga;
$ga->setStartDate(Carbon::parse('7 days ago'));
$ga->setEndDate(Carbon::parse('yesterday'));
}
is it what did you mean?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
o yeah, I forgot to mention that I'm in Laravel 5.3 |
Are you sure that the carbon objects are giving you the expected results? |
I'm rather confused though, but that's what I get |
So, what should I do? |
You can simply do |
OK, thank you |
Wait, I didn't notice the last hotfix. As soon as I found it yesterday, I updated the package to it, but my issue still persist before I change line 51 of |
You should be getting an Exception as expected. Can you show me the error message? |
Okay, I got it that date response value like As for the error message I got, it's likely triggered by |
Please help I still don't get it to set start date and end date. Edit: solved. |
Hi, I tried to set
startDate
andendDate
in cunstructor manually, but always ended up getting error above. But after I changed the code ofPeriod.php
at line 51 to this:$this->validatePeriod(null, $startDate);
the error has gone. so what's going on there?Edit: o yeah, I also got the result of API call like this.
Why the month numbers of December become
11
instead of12
and for January also00
instead of01
?The text was updated successfully, but these errors were encountered: