# |
Jun 22nd 2021, 22:23 |
tyler.adam.lazenby |
trying a few things with composer |
# |
Jun 22nd 2021, 22:20 |
tyler.adam.lazenby |
and I have a plugin that is called Dashboard |
# |
Jun 22nd 2021, 22:20 |
tyler.adam.lazenby |
Controller class Dashboard could not be found. |
# |
Jun 22nd 2021, 22:20 |
tyler.adam.lazenby |
but now I have a different issue |
# |
Jun 22nd 2021, 22:20 |
tyler.adam.lazenby |
I realized it was my system level php , and not my vhost php |
# |
Jun 22nd 2021, 22:13 |
kevin.pfeifer |
and check if the tmp/debug_kit.sqlite file can actually be written by your php process |
# |
Jun 22nd 2021, 22:07 |
kevin.pfeifer |
php extension pdo_sqlite is loaded? |
# |
Jun 22nd 2021, 22:03 |
tyler.adam.lazenby |
has anybody else gotten this? |
# |
Jun 22nd 2021, 22:03 |
tyler.adam.lazenby |
just came back to a project and I am suddenly getting this The datasource configuration "debug_kit" was not found. |
# |
Jun 22nd 2021, 20:15 |
umer936 |
Thank you, that seems a good option |
# |
Jun 22nd 2021, 19:04 |
admad |
@umer936 you can put all your common code from the "template" website too into a "base" plugin. |
# |
Jun 22nd 2021, 18:20 |
slackebot1 |
if we make the "template" into a vendor app and composer include it into each "Site A" "Site B" app, correct? Or does the "template" website work better as it's own app and the Plugin "Site A" "Site B" s work better as git submodules and we solely clone the one needed for that build? |
# |
Jun 22nd 2021, 18:20 |
umer936 |
Quick question. So we have a "template" website that we build off of for other websites. The majority of the Config stays in that template, as do most of the views. Currently, the whole template website repo is cloned and the sites go in Plugins as "Site A", "Site B", etc. However, I don't like that the base code is duplicated in each deployment. It's not easy keeping things in version control because of it. Would it be better |
# |
Jun 22nd 2021, 18:07 |
madjid.gacem |
```$this->customerTable = TableRegistry::getTableLocator()->get('Customers', [ 'className' => CustomerTable::class, ]);``` |
# |
Jun 22nd 2021, 18:07 |
madjid.gacem |
@kevin.pfeifer thank u for the link, technically i'm working on a separate boundedContext the tables are located inside the infrastructure folder, i managed to make it working by using this approach |
# |
Jun 22nd 2021, 18:05 |
kevin.pfeifer |
@madjid.gacem according to https://stackoverflow.com/questions/47717720/organize-models-in-subdirectories-cakephp-3 you would have to create your own TableLocator which contains that Subfolder. Instead I would highly recommend to split your code into a plugin instead of using subfolders |
# |
Jun 22nd 2021, 17:57 |
madjid.gacem |
Hi there, guys i've a CustomerTable into a separate folder with its own namespace, how can i get an instance of it using ```TableRegistry::getTableLocator()->get('Customers')``` ? |
# |
Jun 22nd 2021, 17:30 |
kevin.pfeifer |
I would create a custom finder method in the other model, call that in the controller where I need it and set the result as a separate array in the view. If they don’t actually have any connection at all, why should the data be accessed via an entity field? |
# |
Jun 22nd 2021, 17:20 |
kevin.pfeifer |
or use a svg :P |
# |
Jun 22nd 2021, 17:19 |
dereuromark |
time upgrade :P |
# |
Jun 22nd 2021, 17:18 |
kevin.pfeifer |
uh, fontaweomse 4.6.3 doesn’t have a discord icon… |
# |
Jun 22nd 2021, 17:05 |
kevin.pfeifer |
didn't know the cakephp.org page itself is a accessable repository as well :) I will make a PR which adds the discord link in the same area where the slack link is present |
# |
Jun 22nd 2021, 16:46 |
kevin.pfeifer |
what SQL would you like to represent in such an association? |
# |
Jun 22nd 2021, 16:45 |
ndm |
What would you want that association to use for establishing relations instead? Baked potatoes? |
# |
Jun 22nd 2021, 16:26 |
kevin.pfeifer |
is it possible to add that discord link to https://cakephp.org/get-involved |
# |
Jun 22nd 2021, 16:24 |
kevin.pfeifer |
well hello there |
# |
Jun 22nd 2021, 16:22 |
kevin.pfeifer |
well then you got things to learn :) |
# |
Jun 22nd 2021, 16:21 |
NMND |
I don't even know what slack is. :D |
# |
Jun 22nd 2021, 16:21 |
NMND |
Well I removed all your answer by hitting ctrl which deleted it but as I got most of it, it works now. Many Thanks! :) |
# |
Jun 22nd 2021, 16:21 |
kevin.pfeifer |
and btw: there is a slack channel ;) https://cakesf.herokuapp.com/ |
# |
Jun 22nd 2021, 16:13 |
kevin.pfeifer |
and then just check if that object is empty or not via `if( !empty( $identity ) ):` |
# |
Jun 22nd 2021, 16:13 |
kevin.pfeifer |
basically you can get the $identity object via `$identity = $this->getRequest()->getAttribute( 'identity' );` |
# |
Jun 22nd 2021, 16:12 |
NMND |
That message got ripped apart by no markup within the IRC client. (srsly, why is there no discord? :/ ) but I'll try to sort it and figure it out, thanks! :) |
# |
Jun 22nd 2021, 16:08 |
slackebot1 |
'controller' => 'Users', 'action' => 'login', 'plugin' => 'CakeDC/Users' ] ) ?> <?php endif; ?>``` |
# |
Jun 22nd 2021, 16:08 |
kevin.pfeifer |
```/** @var Authorization\Identity $identity */ $identity = $this->getRequest() ->getAttribute( 'identity' ); <?php if( !empty( $identity ) ): ?> <?= $this->Html->link( sprintf('Logout (%s)', $identity->getOriginalData()->username), [ 'controller' => 'Users', 'action' => 'logout', 'plugin' => 'CakeDC/Users' ] ) ?> <?php else: ?> <?= $this->Html->link( 'Login', [ |
# |
Jun 22nd 2021, 15:52 |
NMND |
Sers. Total Newb using v4.x here. Got through the tutorial. I will need some tutoring until I understand how this works. I HTMLd myself a few buttons into default.php. Now I'd like to replace the login button with a logout button when the user is logged in. Anyone able to spoonfeed or post a up2date tutorial? |
# |
Jun 22nd 2021, 13:00 |
erwane |
it's pretty cool to have localized URL's but .... not really usefull and SEO is not only based on that. |
# |
Jun 22nd 2021, 12:57 |
david |
Thank you guys... I think I will desist in this |
# |
Jun 22nd 2021, 12:56 |
erwane |
Now i'mu using the AdMad i18n plugin and don't translate routes. |
# |
Jun 22nd 2021, 12:56 |
erwane |
Package : <https://packagist.org/packages/erwane/cakephp-i18n-url> Source : <https://github.com/Erwane/cakephp-i18nUrl/tree/4.x> I abandonned the idea. Very complex to maintain. But it work like that : https://pastebin.com/jzXgWJrN |
# |
Jun 22nd 2021, 12:48 |
erwane |
I've done something like that earlier. I'll check if code is public |