# |
Apr 8th 2019, 09:00 |
asdfgh |
i have two tables agents projects now i have to create a new table where i save the views that an agent does on projects should i call it agent_project_views or agents_projects_views ? |
# |
Apr 8th 2019, 08:59 |
asdfgh |
hello |
# |
Apr 8th 2019, 08:53 |
conehead |
Ah, might have to use objects instead of plain ids |
# |
Apr 8th 2019, 08:51 |
conehead |
I am trying to store some data with joinData. Unfortunately for the data no id is generated automatically. The Id field always keeps empty which causes errors. ``` Array ( [0] => Array ( [_joinData] => Array ( [model] => archive ) [id] => 5c8e50a8-3500-4bf2-bf68-0027ac140004 ) ) ``` Anyone got an Idea why this might be happening? |
# |
Apr 8th 2019, 08:33 |
narendravaghela |
yes |
# |
Apr 8th 2019, 08:25 |
conehead |
I think my biggest problem are the plugins I was using. |
# |
Apr 8th 2019, 08:24 |
narendravaghela |
@conehead Thanks mate! I also believe it is a kind of rewriting the app, we can just use the existing business logic and convert it into 3.x code base |
# |
Apr 8th 2019, 08:23 |
conehead |
@narendravaghela Currently doing the same. Pretty much tried every tools. They mainly helped with reordering the structure. Due to a couple of old plugins I was using, I am more or less rewriting everything right now |
# |
Apr 8th 2019, 07:36 |
kani |
Can i auth async request with csrfToken ? |
# |
Apr 8th 2019, 07:33 |
narendravaghela |
Yeah, I thought the same, my client has 2 products built with CakePHP 2.x and now he wants to upgrade them. They are kind of large projects/ |
# |
Apr 8th 2019, 07:32 |
dereuromark |
well, depending on the size of your project it can be quite some work, even with all the automation of upgrade tools. |
# |
Apr 8th 2019, 07:31 |
narendravaghela |
How easy it is to upgrade from 2.x to 3.x? Is it like a kind of rewrite? |
# |
Apr 8th 2019, 07:24 |
Franky |
$html = $convertEmailToHtml->element('test', [$data]);``` but this "brakes" MVC flow.... so is there any other solution or "best practice" ? |
# |
Apr 8th 2019, 07:24 |
Franky |
haha cool, I have question about email templates. So, I need html template from Tempalte/Emails/html folder to send it using another service (not Cakephp Mailer). I have tryed to use ```new View(); |
# |
Apr 8th 2019, 07:17 |
neon1024 |
Europe is coming online! |
# |
Apr 8th 2019, 07:16 |
dereuromark |
international :slightly_smiling_face: i am not yet awake it seems^^ |
# |
Apr 8th 2019, 07:16 |
dereuromark |
early is a relative concept - with a internal crowd of basically all timezones |
# |
Apr 8th 2019, 07:07 |
hippo |
Hi Franky |
# |
Apr 8th 2019, 06:40 |
Franky |
Morning, anybody here so early? |
# |
Apr 8th 2019, 05:14 |
conehead |
Good morning guys |
# |
Apr 8th 2019, 02:15 |
kani |
Can i auth async request with csrfToken? |
# |
Apr 7th 2019, 22:40 |
abdualelah.mdy |
$prices = $this->request->getData('Prices'); $entities = $this->ResortPriceInfos->newEntities($prices); $this->ResortPriceInfos->saveMany($entities); |
# |
Apr 7th 2019, 22:40 |
abdualelah.mdy |
if I want to update multiple records at once. Will this work? |
# |
Apr 7th 2019, 22:26 |
challgren |
https://www.php.net/manual/en/function.defined.php |
# |
Apr 7th 2019, 22:24 |
challgren |
why not used `if(!defined('VAR_NAME')) {` you need that extra d on the end |
# |
Apr 7th 2019, 22:22 |
slackebot |
'Database/Mysql', 'persistent' => true, 'host' => MYSQL_URL, 'login' => MYSQL_USER, 'password' => MYSQL_PASSWORD, 'database' => MYSQL_DATABASE, 'prefix' => '', 'encoding' => 'utf8', 'timezone' => 'UTC', ); }``` |
# |
Apr 7th 2019, 22:22 |
weto.jc |
Hi everyone, I need to retrieve the environment variable in cakephp version 2.x database.php, what is the best way to do it? I'm currently doing it as follows: writing a constant in bootstrap.php and retrieving it in database.php, but it is not working. bootstrap.php ```if(@!define('MYSQL_USER')){ define('MYSQL_USER', getenv('MYSQL_USER')); }``` e database.php ```class DATABASE_CONFIG { public $default = array( 'datasource' => |
# |
Apr 7th 2019, 22:20 |
challgren |
https://book.cakephp.org/2.0/en/models/saving-your-data.html#model-saveall-array-data-null-array-options-array |
# |
Apr 7th 2019, 22:20 |
challgren |
saveAll is a wrapper around saveMany and saveAssociated methods |
# |
Apr 7th 2019, 22:19 |
abdualelah.mdy |
what is the different between saveAll() and saveMany()? |
# |
Apr 7th 2019, 22:18 |
abdualelah.mdy |
hello |
# |
Apr 7th 2019, 17:34 |
yamcomnet |
works |
# |
Apr 7th 2019, 17:34 |
yamcomnet |
something with the form input: <?php echo $this->Form->input('select_agent',['options' => $local_agents,'empty' => __('Select Agent')]) ?> |
# |
Apr 7th 2019, 17:29 |
ergin |
Hello all. I just get old Cakephp project. Version number is 2.10. When I try access to project, its return 504 Gateway Time-out. I set the app/tmp folder permission. Whats need else? |
# |
Apr 7th 2019, 17:20 |
yamcomnet |
view: <?php echo $this->Form->select('select_agent',[$local_agents->toList(),'empty' => __('Select Agent')]) ?> |
# |
Apr 7th 2019, 17:20 |
yamcomnet |
$agents = $this->loadModel('LocalShippingAgents'); $local_agents = $this->LocalShippingAgents->Users->find('list',['keyField' => 'id','valueField' => 'username']) ->contain(['LocalShippingAgents']) ->where(['local_shipping_agent_id IS NOT' => NULL]) #->toArray() ; $this->set('local_agents',$local_agents); |
# |
Apr 7th 2019, 17:20 |
yamcomnet |
really not sure why my select appears like |
# |
Apr 7th 2019, 15:31 |
maymeow |
can i create migration for tree model ? |
# |
Apr 7th 2019, 13:18 |
isvyas |
Hello all, I am developing this project which gives basic skeleton for Single Page Application using CakePHP and Vue.js, please have a look at it and provide you valuable feedback or ideas how it should work or can improve. Here the link @https://github.com/ishanvyas22/cakephpvue-spa. Also looking for contributors to add new features. Thanks. |
# |
Apr 7th 2019, 12:06 |
challgren |
But I’m getting ready to hunker down, bad storms coming and maybe some flooding, expecting 2-3 inches of rain in an hour |
# |
Apr 7th 2019, 12:02 |
challgren |
But I am now having a hell of a time with the View always wanting to put pdf in the path |