# |
May 6th 2019, 18:04 |
ricksaccous |
@itmpls you can automatically join on predefined ones with methods like innerJoinWith('PredefinedAssociation'); |
# |
May 6th 2019, 18:03 |
ricksaccous |
@phantomwatson it seems like you can't do that... it seems only prefixes are a thing, i guess cakephp wasn't set up for multi-site i wonder if you could cook up a middleware to help out or something |
# |
May 6th 2019, 18:03 |
phantomwatson |
I don't really understand what you're going for. As a strategy for updating an associated table when you save? |
# |
May 6th 2019, 18:01 |
itmpls |
to be used by the ORM, not manual like a ->join() |
# |
May 6th 2019, 18:01 |
itmpls |
like a dynamic one, not one within the model? |
# |
May 6th 2019, 18:01 |
itmpls |
$query = $table->find()->setAssociation() or something? |
# |
May 6th 2019, 18:00 |
phantomwatson |
@itmpls, do you mean this? https://book.cakephp.org/3.0/en/orm/saving-data.html#saving-additional-data-to-the-join-table |
# |
May 6th 2019, 17:59 |
phantomwatson |
Yeah, that's what I'm trying to figure out how to do. |
# |
May 6th 2019, 17:59 |
itmpls |
within the query itself |
# |
May 6th 2019, 17:59 |
itmpls |
where's the docs on setting a manual association? |
# |
May 6th 2019, 17:59 |
ricksaccous |
@phantomwatson is that not something you can scope? |
# |
May 6th 2019, 17:47 |
phantomwatson |
@ondrej.nedvidek, what are you specifically trying to achieve? |
# |
May 6th 2019, 17:45 |
phantomwatson |
Is there any more efficient way to set a _bunch_ of route rules to only apply to a specific subdomain than just adding `->setHost('foo.example.com')` to every rule? I thought there was something like `Router::prefix()` that you could wrap around rules to apply a `_host` constraint to each contained route, but I'm not finding that. |
# |
May 6th 2019, 15:42 |
slackebot |
with `attributes.type=color` condition but this won't affect saving. In ideal world when I use `ColorsTable` and `Color` entity I should not have to care about `attributes.type` param at all, if you got my point. Any idea ? |
# |
May 6th 2019, 15:42 |
ondrej.nedvidek |
Hi there, I would like to have table called eg `attributes` which should contain some of shop `product` attributes. Ideally I would like to create `ColorsTable`, `SizesTable` along with its entities for this which both would point to same database table `attributes` and difference would be in param `attributes.type` which will have `color`, `size` respectively. Find should be relatively ease to achieve by modifing `findAll()` method |
# |
May 6th 2019, 15:14 |
ricksaccous |
innerJoinWith maybe |
# |
May 6th 2019, 15:14 |
ricksaccous |
leftJoinWith |
# |
May 6th 2019, 15:08 |
itmpls |
i have various tables (up to 3 levels) in a select.. i want to concat one of them. is there a way I can avoid specifying every single table if I do a concat? |
# |
May 6th 2019, 14:29 |
cburch |
Sorry, CakePHP 3.7, Auth plugin 1.1 |
# |
May 6th 2019, 14:27 |
conehead |
@cburch Are you on cake1? |
# |
May 6th 2019, 14:26 |
cburch |
Hello, does anyone have/know of examples using the CakePHP Authentication plugin with LDAP, I am having a hard time correctly defining the bindDN key when trying to load the LDAP Identifier https://book.cakephp.org/authentication/1.1/en/identifiers.html#ldap Thanks for any help! |
# |
May 6th 2019, 14:25 |
shupel16 |
Hey guys. Its been a very exciting ride with cakephp I love it |
# |
May 6th 2019, 12:40 |
slackebot |
'Service.2' ) ) ``` I realy don't know why the `prefix` key is not in `Service` array.... Any ideas? |
# |
May 6th 2019, 12:40 |
matus.gasper |
Hi guys, i need help with virtual fields in CakePHP v2 This is my code: ``` $service = new Service(); $service->virtualFields = [ 'prefix' => 'CONCAT("Service.", Service.id)' ]; $services = $service->find('first', [ 'fields' => ['Service.prefix', 'Service.name'], 'recursive' => -1 ]); ``` And this is result: ``` array( 'Service' => array( 'name' => 'PBX Basic' ), (int) 0 => array( 'Service__prefix' => |
# |
May 6th 2019, 12:29 |
voycey |
Yeah we have done that - i think the way we wrote some tests was a bit dumb as it basically "linked" a load of records together |
# |
May 6th 2019, 12:28 |
admad |
@voycey remove the `id` key from records as done in core fixtures https://github.com/cakephp/cakephp/blob/master/tests/Fixture/ArticlesFixture.php |
# |
May 6th 2019, 09:06 |
slackebot |
href="/apple-touch-icon-152x152.png" /> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png" /> ` |
# |
May 6th 2019, 09:06 |
slackebot |
rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png" /> <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png" /> <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png" /> <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png" /> <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png" /> <link rel="apple-touch-icon" sizes="152x152" |
# |
May 6th 2019, 09:06 |
johnwayne |
Hi, what are you using for Apple touch icons (Favicon) in the Head of html file? I am using `iconifier.net` generator and still getting error that some kind of Favicons are missing (Only if I visit my site with iPhone) ` <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <link rel="apple-touch-icon" href="/apple-touch-icon.png" /> <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png" /> <link |
# |
May 6th 2019, 07:45 |
slackebot |
<np> |
# |
May 6th 2019, 07:43 |
np |
Hello: PHP Fatal error: Interface ‘PHP_CodeSniffer\Sniffs\Sniff’ not found in /vagrant/vendor/cakephp/cakephp-codesniffer/CakePHP/Sniffs/Strings/ConcatenationSpacingSniff.php on line 28 |
# |
May 6th 2019, 06:24 |
faizalheesyam |
how bout the .htaccess? |
# |
May 6th 2019, 01:40 |
Rupi |
But it opens index.php |
# |
May 6th 2019, 01:40 |
Rupi |
hi, I just copied my site from Linux to Windows and it doesn't see webroot content, like /css and /script |
# |
May 6th 2019, 00:05 |
voycey |
In Postgres they dont like you adding in values to Sequence columns, how do people handle fixtures with this? Cake bakes the id column into the fixture - is there something we should be doing with this? |
# |
May 5th 2019, 17:24 |
admad |
in cake3 plugins installed through composer also go under `vendor` folder |
# |
May 5th 2019, 17:22 |
fra.bdn |
I mean https://github.com/scherersoftware/cake-websocket, that I have installed with composer. It is in the vendor folder, not in the plugin folder. |
# |
May 5th 2019, 17:18 |
admad |
If you "component" you mean a cake plugin then yes you can `->script('PluginName./lib/lib/foo.js')` |
# |
May 5th 2019, 17:04 |
fra.bdn |
Hi, is it possible to include the js from the webroot/js/lib folder of a component in the vendor folder? I have tried with $this->html-script('componentName.lib.script.js') but it does not work. |
# |
May 4th 2019, 19:21 |
maymeow |
learned that same way :) |
# |
May 4th 2019, 13:01 |
hollistergraham123 |
@maymeow Thanks for the advice. Differently learned that the hard way when I renamed my Api prefix folder api and everything broke when I went to deploy. |