# |
Apr 20th 2017, 07:56 |
voycey |
ill fudge it in JS |
# |
Apr 20th 2017, 07:56 |
voycey |
dosent catch it :( |
# |
Apr 20th 2017, 07:56 |
Neon1024 |
https://github.com/zendframework/zend-diactoros/blob/master/src/Uri.php#L213 |
# |
Apr 20th 2017, 07:55 |
Neon1024 |
Perhaps |
# |
Apr 20th 2017, 07:55 |
Neon1024 |
$this->request->getUri()->getFragment() |
# |
Apr 20th 2017, 07:55 |
Neon1024 |
Yes, fragment it seems |
# |
Apr 20th 2017, 07:54 |
Neon1024 |
$this->request->getUrl()-> |
# |
Apr 20th 2017, 07:54 |
Neon1024 |
Wellif you’re on Cake 3, using Middleware, then you could check the Url class in PSR7 |
# |
Apr 20th 2017, 07:52 |
voycey |
Is there anything built into cake to get the #in the URL? |
# |
Apr 20th 2017, 07:46 |
birdy247 |
he is a laravell man. But I am "converting" him to cake :) |
# |
Apr 20th 2017, 07:46 |
birdy247 |
We shall see |
# |
Apr 20th 2017, 07:45 |
Neon1024 |
Ah cool, good luck, hope it all works out |
# |
Apr 20th 2017, 07:42 |
birdy247 |
Southampton |
# |
Apr 20th 2017, 07:42 |
birdy247 |
Taking on someone who is originally from your neck of the woods :slightly_smiling_face: |
# |
Apr 20th 2017, 07:41 |
birdy247 |
Trying to grow the business |
# |
Apr 20th 2017, 07:41 |
birdy247 |
Bit if a dautning time |
# |
Apr 20th 2017, 07:41 |
birdy247 |
Yea not too bad thanks |
# |
Apr 20th 2017, 07:40 |
Neon1024 |
How’s things with you dude? Hope all is well |
# |
Apr 20th 2017, 07:38 |
birdy247 |
Morning Neon1024 |
# |
Apr 20th 2017, 07:37 |
Neon1024 |
Hey birdy247 |
# |
Apr 20th 2017, 07:27 |
birdy247 |
morning |
# |
Apr 20th 2017, 06:25 |
voycey |
and as a big change to something which for the past several cakephp versions has been much simpler it will help out - ill update the docs shorty |
# |
Apr 20th 2017, 06:23 |
voycey |
I know - all of the other ->having ->where etc has it, it's the first time I have come across this so far |
# |
Apr 20th 2017, 06:23 |
admad |
@voycey well we can't go about about document basic PHP features in the cakephp manual. `function ($foo) use ($var)` usage is standard PHP. |
# |
Apr 20th 2017, 06:11 |
voycey |
yeah just wondering why this isnt documenteD? |
# |
Apr 20th 2017, 05:40 |
hiromi2424 |
@voycey function ($q) use ($id) { |
# |
Apr 20th 2017, 05:33 |
voycey |
so yes I do apparantly |
# |
Apr 20th 2017, 05:31 |
slackebot5 |
$q->where(['Locations.retailer_id' = $id]);``` im getting $id not found here |
# |
Apr 20th 2017, 05:31 |
voycey |
```$totalGeofenceImpressions = $this->GeofenceImpressions ->find() ->contain(['Geofences.Locations' => function($q) { return $q->where(['Locations.retailer_id' => $id]); }]) ->where([ 'GeofenceImpressions.timestamp >=' => ($periodStart), 'GeofenceImpressions.timestamp =' => ($periodEnd) ]) ->count();``` For example - ```retu |
# |
Apr 20th 2017, 05:29 |
voycey |
as an anonymous function |
# |
Apr 20th 2017, 05:29 |
voycey |
if I want to use a variable in a contain function do I need to 'use' it? |
# |
Apr 20th 2017, 05:20 |
rrueco |
I see. Thanks. I will read the docs sir |
# |
Apr 20th 2017, 05:20 |
hiromi2424 |
less than or equal. see: https://book.cakephp.org/3.0/en/chronos.html#comparison-methods |
# |
Apr 20th 2017, 05:19 |
rrueco |
@hiromi2424 what's lte? |
# |
Apr 20th 2017, 05:17 |
hiromi2424 |
@rrueco ok? |
# |
Apr 20th 2017, 05:17 |
hiromi2424 |
convert to Date object If string date expression come and then compare it with lte( <= ) |
# |
Apr 20th 2017, 05:16 |
hiromi2424 |
and Date class is preferred class to handle date field/value. |
# |
Apr 20th 2017, 05:16 |
hiromi2424 |
creating custom validation via lambda |
# |
Apr 20th 2017, 05:13 |
hiromi2424 |
see https://book.cakephp.org/3.0/en/core-libraries/validation.html#custom-validation-rules |
# |
Apr 20th 2017, 05:10 |
rrueco |
Thank youi |
# |
Apr 20th 2017, 05:08 |
hiromi2424 |
good luck! |