# |
Jul 25th 2017, 06:46 |
sonu_nk |
i am getting error when i am access api url ... https://pastebin.com/5g26RTU5 |
# |
Jul 25th 2017, 06:45 |
dipesh |
I want to use CORS in cakephp 3.0. So, how can I enable CORS? |
# |
Jul 25th 2017, 06:34 |
dipesh22 |
Hello, I am trying to use CORS in cakephp 3.0. So how can I enable it? |
# |
Jul 25th 2017, 05:47 |
Modicrumb |
sweet |
# |
Jul 25th 2017, 05:47 |
Modicrumb |
nevermind, got it handled |
# |
Jul 25th 2017, 05:32 |
Modicrumb |
it's true by default though... |
# |
Jul 25th 2017, 05:31 |
Modicrumb |
ahh i see there is an allowMultipleNulls |
# |
Jul 25th 2017, 05:30 |
Modicrumb |
what's the best way to do this? |
# |
Jul 25th 2017, 05:30 |
Modicrumb |
and if it isn't filled out obviously i don't care about it being unique |
# |
Jul 25th 2017, 05:29 |
Modicrumb |
basically i want a field to be unique, however i want it to be optional as well |
# |
Jul 25th 2017, 05:29 |
Modicrumb |
i'm having a problem |
# |
Jul 25th 2017, 03:16 |
FeonoR |
This field is needed in one case, and should be hidden in other |
# |
Jul 25th 2017, 03:15 |
FeonoR |
Or no...it's impossible in my case |
# |
Jul 25th 2017, 03:12 |
genellern |
@feonor why don't you set the hidden type? |
# |
Jul 25th 2017, 01:42 |
FeonoR |
Help me |
# |
Jul 25th 2017, 01:20 |
feonor |
How can I get text of select component in my controller when i use getData() ? |
# |
Jul 25th 2017, 00:51 |
feonor |
Is it possible to use javascript in my views to show hide fields created by FormHelpers ? |
# |
Jul 25th 2017, 00:16 |
FeonoR |
Hi to all, could anybody help me with using javascript in my cake project ?7 |
# |
Jul 24th 2017, 22:35 |
xuding |
tx |
# |
Jul 24th 2017, 22:35 |
xuding |
fixed the issue |
# |
Jul 24th 2017, 22:35 |
xuding |
upgrading to cakephp 3.4.11 |
# |
Jul 24th 2017, 22:27 |
xuding |
sorry, it should be 5.7.21 |
# |
Jul 24th 2017, 21:58 |
chris-andre |
@gutts could you use Router::url ? |
# |
Jul 24th 2017, 21:47 |
xuding |
anyone has seen this before? |
# |
Jul 24th 2017, 21:47 |
xuding |
``` PHP Fatal error: Declaration of Cake\TestSuite\Fixture\FixtureInjector::addFailure(PHPUnit\Framework\Test $test, PHPUnit\Framework\AssertionFailedError $e, $time) must be compatible with PHPUnit_Framework_TestListener::addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) in ...public/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php on line 44 ``` |
# |
Jul 24th 2017, 21:47 |
xuding |
and getting errors as shown below: |
# |
Jul 24th 2017, 21:47 |
xuding |
hi, I am running PHP7.1, CakePHP 3.4.7 and PHPUnit 5.6 |
# |
Jul 24th 2017, 21:31 |
gutts |
how can I replicate $this->Html->link() but within a controller? i'm trying to pass it into a variable where it binds them to an email that has the template stored in the db |
# |
Jul 24th 2017, 20:03 |
jarard |
yeah I think so to, I need to get Proffer working correctly, I think I need to report the issue to Neon1024 as something isn't working quite right |
# |
Jul 24th 2017, 19:41 |
chrisshick |
But I do recommend trying to do it the way proffer suggest so that it would prevent you from making any customized code that you have to keep track of |
# |
Jul 24th 2017, 19:40 |
chrisshick |
well, to help you with your original question: in the afterSave you could query for all images associated with that record and then delete all but the latest one |
# |
Jul 24th 2017, 19:32 |
jarard |
*when i use a hasOne.. |
# |
Jul 24th 2017, 19:32 |
jarard |
the issue I have one use a hasOne is the file is uploaded but the dir and file are not saved to my links table |
# |
Jul 24th 2017, 19:28 |
jarard |
just because I have existing data |
# |
Jul 24th 2017, 19:27 |
chrisshick |
I guess you could if you REALLY wanted to although it doesn't make much sense to do that if you are only going to have 1 image to a link |
# |
Jul 24th 2017, 19:26 |
jarard |
can I keep the hasMany table? |
# |
Jul 24th 2017, 19:26 |
chrisshick |
https://github.com/davidyell/CakePHP3-Proffer/blob/master/docs/configuration.md#configuring-the-behaviour-in-your-table |
# |
Jul 24th 2017, 19:25 |
jarard |
yes |
# |
Jul 24th 2017, 19:24 |
chrisshick |
Are you using cake 3? |
# |
Jul 24th 2017, 19:24 |
chrisshick |
then a field for the directory |
# |
Jul 24th 2017, 19:23 |
chrisshick |
So, if you have a Links table then there should be a field called 'image' ( this is configureable ) |