# |
Sep 6th 2019, 12:44 |
alexdd55976 |
create an array of variables for cakemailer and use the same array for your own class. |
# |
Sep 6th 2019, 12:43 |
koeller |
One time in CakeMailer and one time in Mailjet |
# |
Sep 6th 2019, 12:42 |
koeller |
Yes, but I would declare the same varialbe two times |
# |
Sep 6th 2019, 12:40 |
alexdd55976 |
why not.. you are initializing a class somewhere, does not matter what class. and if you write your own mailjet class, you can decalre your template variables the same way the cakemailer does |
# |
Sep 6th 2019, 12:39 |
koeller |
but then I would not be able to declare template variables in UserMailer and have to that priot before using for example $this->getMailer(‘User’)->send(‘myMail’) |
# |
Sep 6th 2019, 12:37 |
alexdd55976 |
you can decide before you call the UserMailer |
# |
Sep 6th 2019, 12:36 |
koeller |
But I can’t decide that in for example App\Mailer\UserMailer, because it would use Cake\Mailer |
# |
Sep 6th 2019, 12:34 |
alexdd55976 |
the api seems to be pretty straight forward |
# |
Sep 6th 2019, 12:34 |
alexdd55976 |
@koeller create a class for the mailjet api and decide in code what mailer should be used.. either cakemailer or mailjet |
# |
Sep 6th 2019, 12:32 |
slackebot |
a good idea on how to do that? |
# |
Sep 6th 2019, 12:32 |
koeller |
hi everyone, I’m in the process of integrating MailJet into a project of mine. So far I used the cake internal Mailer. I would like to be able to switch between CakeMailer and MailJet through a config variable. I’m now looking for a cake way to implement this switch. I would like to reuse the code of all my mailers, as those fill out some variables before they got used in a mail. Does anyone have implemented something like that before, or |
# |
Sep 6th 2019, 12:30 |
alexdd55976 |
@maymeow if its ApplicationUser the is user_id is not accessible |
# |
Sep 6th 2019, 12:28 |
alexdd55976 |
@maymeow what is your related table? Profiles? |
# |
Sep 6th 2019, 12:10 |
maymeow |
Hi! can some one tell me where is problem? When i saving hasMany association all is OK, but when i want `hasOne` Its trying to save new value without `user_id ` so and returns error about `user_id has not default value` all files (i hope) are here iff need more ask... I watched this many times but cant find whats wrong https://gist.github.com/MayMeow/03127b8e2ea7e6d35f9ee55cef3988a1 |
# |
Sep 6th 2019, 12:08 |
admad |
heh, thought so. i bet most who dislike auto tables would miss it if it were turned off |
# |
Sep 6th 2019, 12:07 |
ndm |
hell no :slightly_smiling_face: |
# |
Sep 6th 2019, 12:06 |
admad |
does gluten free stuff taste as good? |
# |
Sep 6th 2019, 12:04 |
admad |
@ndm you are a talented man :) |
# |
Sep 6th 2019, 12:01 |
ndm |
@admad I could also bake my own fermented, gluten-free lentil bread :slightly_smiling_face: |
# |
Sep 6th 2019, 11:56 |
neon1024 |
Anyway, apologies. I can’t help with this issue :slightly_smiling_face: Perhaps someone else can |
# |
Sep 6th 2019, 11:55 |
neon1024 |
My wood burner uses logs, but you don’t see me jamming them into my cars gas tank |
# |
Sep 6th 2019, 11:55 |
neon1024 |
You could do that in PHP |
# |
Sep 6th 2019, 11:55 |
development |
I have a node application that takes input and produces an image, that I am not trying to do through PHP. Therefore I would like to execute this script via PHP and build a class around this. |
# |
Sep 6th 2019, 11:53 |
neon1024 |
:$ |
# |
Sep 6th 2019, 11:53 |
slackebot |
Action: admad applauds neon1024 |
# |
Sep 6th 2019, 11:53 |
neon1024 |
Why install two server-side programming languages when you can use one? |
# |
Sep 6th 2019, 11:52 |
neon1024 |
Why is `php run` different to `node run`? |
# |
Sep 6th 2019, 11:52 |
neon1024 |
Why is running Node using PHP beneficial? |
# |
Sep 6th 2019, 11:52 |
neon1024 |
What problem are you looking to solve? |
# |
Sep 6th 2019, 11:52 |
neon1024 |
What benefits do you gain? |
# |
Sep 6th 2019, 11:52 |
neon1024 |
I would have thought that was obvious |
# |
Sep 6th 2019, 11:52 |
development |
How so? |
# |
Sep 6th 2019, 11:51 |
neon1024 |
Wrapping it in PHP seems totally illogical to me |
# |
Sep 6th 2019, 11:51 |
development |
Yup |
# |
Sep 6th 2019, 11:51 |
neon1024 |
You know you can literally run `node <thing>` right? |
# |
Sep 6th 2019, 11:51 |
development |
> I would just access the Node application on the CLI directly That's my whole goal. I will do this through CakePHP. |
# |
Sep 6th 2019, 11:51 |
admad |
howdy |
# |
Sep 6th 2019, 11:50 |
neon1024 |
Hey @admad :wave: |
# |
Sep 6th 2019, 11:50 |
admad |
@jotpe @spriz @ndm one can make their own table locator which doesn't fallback to `ORM\Table` instance :slightly_smiling_face: |
# |
Sep 6th 2019, 11:48 |
neon1024 |
I’m sure there is more to it, but the approach doesn’t seem logical to me |
# |
Sep 6th 2019, 11:48 |
neon1024 |
I would just access the Node application on the CLI directly |