# |
Sep 21st 2019, 08:07 |
slackebot |
`people_roles` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(32) DEFAULT NULL, `description` longtext DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` |
# |
Sep 21st 2019, 08:07 |
slackebot |
DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `peoples` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `people_role_id` int(11) unsigned NOT NULL DEFAULT '1', `first_name` varchar(32) DEFAULT NULL, `last_name` varchar(32) DEFAULT NULL, `organization` varchar(96) DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE |
# |
Sep 21st 2019, 08:07 |
adam282 |
``` CREATE TABLE `talks` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `call_for_paper_id` int(11) unsigned NOT NULL DEFAULT '1', `category_id` int(11) unsigned NOT NULL DEFAULT '1', `title` varchar(255) DEFAULT NULL, `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `talks_peoples` ( `people_id` int(11) DEFAULT NULL, `talk_id` int(11) |
# |
Sep 21st 2019, 08:05 |
jotpe |
I tried with a person Model and add a Role to that person. But I can't use save it from the form then. |
# |
Sep 21st 2019, 08:03 |
adam282 |
Hm, shouldn’t be that difficult. |
# |
Sep 21st 2019, 08:03 |
jotpe |
In my Controller I need to save a talk with the corresponding Authors. |
# |
Sep 21st 2019, 08:03 |
jotpe |
Since Author, Spaker and Submitter share the same Information i tried to add a role, but it didn't work that well. |
# |
Sep 21st 2019, 08:02 |
slackebot |
<jotpe> |
# |
Sep 21st 2019, 08:01 |
jotpe |
Morning, folks. I_ve got a problem with associations: |
# |
Sep 21st 2019, 07:59 |
adam282 |
There, got it. |
# |
Sep 21st 2019, 07:59 |
adam282 |
Hm |
# |
Sep 21st 2019, 07:59 |
slackebot |
Action: admad yawns |
# |
Sep 21st 2019, 07:57 |
adam282 |
I might make this kick out an automated e-mail when a new build/release is uploaded as well. |
# |
Sep 21st 2019, 07:56 |
adam282 |
Right now, I upload them to S3 and then give them the link to S3 and then make the item private once downloaded but that sucks. |
# |
Sep 21st 2019, 07:56 |
adam282 |
This app should be a quick build. Very simple. Users, Applications, Application Builds, Application Releases, Clients. Tie a Client to an App and Builds/Releases to an App, upload the Build/Release to S3 and then be able to provide the Client a link that is not directly to S3 so they can download their mobile app builds/releases |
# |
Sep 21st 2019, 07:55 |
adam282 |
Haha, nah, decided not to |
# |
Sep 21st 2019, 07:55 |
adam282 |
Guessing that’s an `innerAttrs` |
# |
Sep 21st 2019, 07:55 |
admad |
i thought you were making an API for js frontend :slightly_smiling_face: |
# |
Sep 21st 2019, 07:54 |
adam282 |
Now if I could figure out how to set `itemWithoutLink`, I’d be good |
# |
Sep 21st 2019, 07:54 |
adam282 |
Haha, nice! Thank you. |
# |
Sep 21st 2019, 07:53 |
admad |
or simply call that method after loading method |
# |
Sep 21st 2019, 07:52 |
admad |
use config/options array when loading helper in AppView::initialize() |
# |
Sep 21st 2019, 07:52 |
challgren |
I think you can config it in your appview |
# |
Sep 21st 2019, 07:50 |
adam282 |
Is it possible to set something like this app wide instead of in each view template? ``` $this->Breadcrumbs->setTemplates([ 'wrapper' => '<nav aria-label="breadcrumb"><ol class="breadcrumb">{{content}}</ol></nav>', 'item' => '<li class="breadcrumb-item"><a href="{{url}}">{{title}}</a></li>' ]); ``` |
# |
Sep 21st 2019, 07:37 |
adam282 |
Never mind, guess that’s how MySQL does when `NOT NULL` is set for a `varchar` |
# |
Sep 21st 2019, 07:36 |
adam282 |
Not sure why name has a `DEFAULT ''` because it shouldn’t. |
# |
Sep 21st 2019, 07:36 |
slackebot |
datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `NAME_TYPE` (`name`,`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ``` The `type` describes what it is for. For instance, `system` is for the actual value while `option` is the JSON object with the options available for a certain parameter generally used in a select field. |
# |
Sep 21st 2019, 07:36 |
adam282 |
Ah, yeah, that won’t work. I store the options in a `settings` table with this structure: ``` CREATE TABLE `settings` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'system', `created` |
# |
Sep 21st 2019, 07:34 |
adam282 |
Well now that I have everything working… Haha |
# |
Sep 21st 2019, 07:34 |
admad |
https://book.cakephp.org/3.0/en/orm/database-basics.html#data-types |
# |
Sep 21st 2019, 07:33 |
admad |
also you won't have to bother json decoding yourself if you set the field to `Json` type using `Table::_initializeSchema()` |
# |
Sep 21st 2019, 07:32 |
admad |
@adam282 you can simply use `FrozenTime::setJsonEncodeFormat()` and `FrozenTime::setToStringFormat()` to set format you want and avoid having to use Time helper each time |
# |
Sep 21st 2019, 06:51 |
adam282 |
I am a big believe of keeping things on few lines as possible. This might be unreadable, but it takes 2 minutes to break it down to different lines to read it. |
# |
Sep 21st 2019, 06:51 |
adam282 |
Yes or No? ``` $this->set('option_date_long', json_decode($this->Settings->find('all', ['conditions' => ['name' => 'date_format_long', 'type' => 'option']])->first()['value'], true)); $this->set('option_date_short', json_decode($this->Settings->find('all', ['conditions' => ['name' => 'date_format_short', 'type' => 'option']])->first()['value'], true)); ``` |
# |
Sep 21st 2019, 05:55 |
adam282 |
Well, I got part way there `Sep 19, 2019 3:10 AM MST` but I guess it’s not possible to add the `th, st, etc` after the day number |
# |
Sep 21st 2019, 05:51 |
adam282 |
For example `<?php echo $this->Time->format($user->created, \IntlDateFormatter::SHORT, null, $this->getRequest()->getSession()->read('Auth.User.timezone')); ?>` gives me something like `9/19/19, 3:10:27 AM Mountain Standard Time` where I would rather have `April 9th, 2019 11:46PM` |
# |
Sep 21st 2019, 05:50 |
adam282 |
Is it possible to go back to using `date()` formats instead of the I18n formats? I am finding it difficult to achieve what I need. |
# |
Sep 21st 2019, 00:50 |
adam282 |
AWS is better for e-mail transport |
# |
Sep 20th 2019, 23:05 |
itmpls |
Why is Cake not selecting my `GROUP_CONCAT(submissions_users.user_id)` column when I a `leftJoinWith('SubmissionsUsers')`? In debugKit, the SQL tab I copy *does* show that group_concat column in my sql program |
# |
Sep 20th 2019, 22:52 |
challgren |
Ah ok |
# |
Sep 20th 2019, 22:30 |
maiconpinto |
@challgren thank you, I think that I changed the flag "x", but in truth, I didn't save. Now, it working correctly. |