# |
Dec 13th 2017, 09:48 |
dereuromark |
joopm: the framework should already do that for you, appending the redirect query string. what version are you on? |
# |
Dec 13th 2017, 09:47 |
neon1024 |
Add the redirect query string to the link |
# |
Dec 13th 2017, 09:47 |
joopm |
how should modify the redirect? |
# |
Dec 13th 2017, 09:46 |
LubosR |
Looks like I am not only one who is not sure :) I have same feelings like you hmic, i like v1, but v2 more versatile :) |
# |
Dec 13th 2017, 09:46 |
joopm |
but in this time no previus page |
# |
Dec 13th 2017, 09:46 |
joopm |
the referer redirect to the previus page |
# |
Dec 13th 2017, 09:46 |
joopm |
but i want that redirect to the same url |
# |
Dec 13th 2017, 09:46 |
joopm |
i having the following issue: i sent an OTP email to a user,when the user click to the link first he need to login |
# |
Dec 13th 2017, 09:45 |
joopm |
hello there |
# |
Dec 13th 2017, 09:39 |
hmic |
and i have been talking about the 2nd case too. |
# |
Dec 13th 2017, 09:38 |
hmic |
you do |
# |
Dec 13th 2017, 09:38 |
saeideng |
and you no need to catch IMO |
# |
Dec 13th 2017, 09:38 |
saeideng |
I means for second style :slightly_smiling_face: |
# |
Dec 13th 2017, 09:37 |
hmic |
saeideng: you don't need that, in the catch case, it will be unset due to the exception |
# |
Dec 13th 2017, 09:36 |
saeideng |
but by default `$project=null` |
# |
Dec 13th 2017, 09:36 |
saeideng |
both is true |
# |
Dec 13th 2017, 09:36 |
hmic |
i'd still say the second version is more "common", it's - theoretically - more versatile at least... but i still like v1 better. in this case it's a very clear codepath |
# |
Dec 13th 2017, 09:35 |
hmic |
LubosR, are you sure the scopes work this way? - at least the $project will not be set when entering the catch... you are setting a value to it, not trying to get anything, so thats ok to me at first sight |
# |
Dec 13th 2017, 09:32 |
LubosR |
I like style v1 (see image) but never used try catch this way so looks bit weird :) |
# |
Dec 13th 2017, 09:31 |
LubosR |
Hey all, I have fundamendal question and it is more about PHP best practices than CakePHP, but still would like to know and I think u can tell. Which style is "correct" https://ibb.co/fyAxN6 |
# |
Dec 13th 2017, 06:09 |
joopm |
dieppk did you use before the $this->loadModel('Modelname') |
# |
Dec 13th 2017, 05:11 |
dieppk |
pls help me |
# |
Dec 13th 2017, 05:11 |
dieppk |
i got error from component when using $this->modelName in controller |
# |
Dec 13th 2017, 05:10 |
dieppk |
hello |
# |
Dec 13th 2017, 04:17 |
joopm |
hello sorry i dont know the answer to your question |
# |
Dec 13th 2017, 04:07 |
beakman |
Oh… |
# |
Dec 13th 2017, 04:04 |
beakman |
@rafael.junqueira.sant Have you seen https://book.cakephp.org/3.0/en/views/helpers/form.html#customizing-the-templates-formhelper-uses ? |
# |
Dec 13th 2017, 03:08 |
joopm |
i have some issue becasue i have there hasmany association |
# |
Dec 13th 2017, 03:07 |
joopm |
is there a way to return a single element insted of the array[0] in a query function? |
# |
Dec 13th 2017, 03:05 |
joopm |
good morning too you |
# |
Dec 13th 2017, 00:08 |
rafael.junqueira.sant |
instead of giving me what I expected, it gives me an input text with type='certainFunction' and name='certainFunction' |
# |
Dec 13th 2017, 00:06 |
rafael.junqueira.sant |
this is in the form templates: 'certainFunction' => '<button{{attrs}} class="btn btn-default"><i class="fa fa-certain-function"></i> '.__('Certain Function - btw, can I do this?').'</button>' |
# |
Dec 13th 2017, 00:05 |
rafael.junqueira.sant |
Hello, is there a way to register a new predefined input template for the Form helper? For example, instead of customizing every button for a certain function, I want to echo $this->Form->certainFunction(). I tried adding certainFunction to the form template list, but it didn't work. |
# |
Dec 12th 2017, 23:13 |
braeden |
Goooooooodmorning vietnam |
# |
Dec 12th 2017, 19:40 |
hughbertd |
Cool, will do |
# |
Dec 12th 2017, 19:39 |
admad |
check vfsStream |
# |
Dec 12th 2017, 19:39 |
hughbertd |
:) thanks, I get it tho ;) |
# |
Dec 12th 2017, 19:39 |
admad |
stupid bot |
# |
Dec 12th 2017, 19:38 |
slackebot |
~tell @hughbertd about google php mock filesystem |
# |
Dec 12th 2017, 19:38 |
slackebot |
Command sent from Slack by admad: |
# |
Dec 12th 2017, 19:36 |
hughbertd |
Hi all, Is there an easy way to mock the filesystem for testing? i.e. like Time::setTestNow |