# |
Dec 19th 2019, 13:40 |
jotpe |
a js function that would select the entry from the generated <select> options and remove/disable it. |
# |
Dec 19th 2019, 13:39 |
jotpe |
Another approach would be to have a 'nested' model. So that each of your club home has a sub array with the visitor clubs. |
# |
Dec 19th 2019, 13:39 |
gianmarxgagliardi |
a js function that takes me from a $clubsUnmated team?^ |
# |
Dec 19th 2019, 13:38 |
jotpe |
Then I would go for a javascript solution. You could Remove the entry based on the selected one. |
# |
Dec 19th 2019, 13:37 |
gianmarxgagliardi |
@jotpe yes |
# |
Dec 19th 2019, 13:36 |
jotpe |
@gianmarxgagliardi So the Entries shown (Club Visitor) are dependent on the previous Selection (Club Home)? |
# |
Dec 19th 2019, 13:35 |
jimbo2150 |
@challgren got it |
# |
Dec 19th 2019, 13:35 |
gianmarxgagliardi |
```echo $this->Form->control('season'); echo $this->Form->control('referee_id', ['options' => $refereesUnmated]); echo $this->Form->control('club_home_id', ['options' => $clubsUnmated]); echo $this->Form->control('club_visitor_id', ['options' => $clubsUnmated]);``` |
# |
Dec 19th 2019, 13:34 |
gianmarxgagliardi |
an extract of add.ctp |
# |
Dec 19th 2019, 13:34 |
slackebot |
//$clubs = $this->Matchs->Clubs->find('list', ['limit' => 200]); $clubsUnmated=$this->Matchs->Clubs->find('list',['keyField' => 'id', 'valueField' =>['nome_societa']]); $this->set(compact('match', 'refereesUnmated', 'clubsUnmated')); }``` |
# |
Dec 19th 2019, 13:34 |
slackebot |
$this->redirect(['action' => 'index']); } $this->Flash->error(__('The match could not be saved. Please, try again.')); } $refereesUnmated=$this->Matchs->Referees->find('list',['keyField' => 'id', 'valueField' =>function($referee){ return $referee->cognome .' '. $referee->nome; }]); |
# |
Dec 19th 2019, 13:34 |
gianmarxgagliardi |
```public function add() { $match = $this->Matchs->newEntity(); if ($this->request->is('post')) { $match = $this->Matchs->patchEntity($match, $this->request->getData()); if ($this->Matchs->save($match)) { $this->Flash->success(__('The match has been saved.')); return |
# |
Dec 19th 2019, 13:33 |
gianmarxgagliardi |
I should make a form to match the matches of the teams. How do I prevent a team from playing against itself |
# |
Dec 19th 2019, 13:24 |
challgren |
No he means you can’t filter by for example authentication related plugins. |
# |
Dec 19th 2019, 13:16 |
jimbo2150 |
You can always contact the developers of said plugins/libraries and ask them to push to Composer ;) |
# |
Dec 19th 2019, 13:03 |
dereuromark |
composer is missing some useful cake specific grouping/filtering, though IMO |
# |
Dec 19th 2019, 12:48 |
jimbo2150 |
Composer pretty much took over for the CakePHP plugins directory - https://packagist.org/?query=cakephp |
# |
Dec 19th 2019, 10:50 |
kiwi_8 |
yo |
# |
Dec 19th 2019, 10:48 |
gianmarxgagliardi |
morning |
# |
Dec 19th 2019, 10:32 |
dereuromark |
sure, the mind reading plugin |
# |
Dec 19th 2019, 10:16 |
challgren |
No plugin to do all that??? :P |
# |
Dec 19th 2019, 10:13 |
dereuromark |
tags, filtering and few other useful meta things are nice to have. just a bit sad no one took better ownership here |
# |
Dec 19th 2019, 10:12 |
dereuromark |
well, in a way, but you cannot fully replace a DB driven approach with a static list |
# |
Dec 19th 2019, 10:12 |
challgren |
Thats what I though, I thought fox/awesome replaced it |
# |
Dec 19th 2019, 10:10 |
dereuromark |
i dont think so, for years |
# |
Dec 19th 2019, 09:49 |
challgren |
Is https://plugins.cakephp.org/ still maintained? |
# |
Dec 19th 2019, 09:08 |
kaliel |
morning all :croissant: |
# |
Dec 19th 2019, 08:50 |
alexdd55976 |
and duderinas |
# |
Dec 19th 2019, 08:50 |
alexdd55976 |
morning dudes |
# |
Dec 19th 2019, 08:32 |
kani |
`<?php` `use Cake\Routing\RouteBuilder;` `use Cake\Routing\Router;` `use Cake\Routing\Route\DashedRoute;` `Router::plugin(` `'Api',` `['path' => '/api'],` `function (RouteBuilder $routes) {` `$routes->fallbacks(DashedRoute::class);` `$routes->setExtensions(['json']);` `$routes->resources("Posts");` `}` `);` |
# |
Dec 19th 2019, 08:19 |
kani |
v4 not loading plugin route |
# |
Dec 19th 2019, 07:58 |
megan |
morning all! |
# |
Dec 19th 2019, 07:52 |
jotpe |
morning |
# |
Dec 19th 2019, 07:42 |
javier.villanueva |
morning all |
# |
Dec 19th 2019, 06:48 |
yadav.manu36 |
Current query: $query = $this->Users->find(); $query->matching('Listings'); $query->matching('Organizations'); I need like this: $query = $this->Users->find(); $query->matching('Listings'); $query->orMatching('Organizations'); Please help me if have any solution about this type of query |
# |
Dec 19th 2019, 06:47 |
yadav.manu36 |
@admad can you please help me, i have post my query 17 Dec but i am not getting proper solution I have a problem Retrieving Data with matching 2 different different Association. I want if have 1 matching table from both matching then we want the result. it is possible using matching? behavior like we need according to matching and orMacthing senorio (edited) In the Laravel have option like: WhereHas() / orWhereHas |
# |
Dec 19th 2019, 06:44 |
yadav.manu36 |
@admad Thanks for this |
# |
Dec 19th 2019, 05:35 |
admad |
No, but you can use any other database management tool to do so, for e.g. mysql workbench |
# |
Dec 19th 2019, 05:12 |
yadav.manu36 |
Like this: https://quickadminpanel.com/blog/generate-sql-db-schema-image-with-laravel-er-diagram-generator/ |
# |
Dec 19th 2019, 05:12 |
yadav.manu36 |
In the CakePHP possible to Generate SQL DB Schema Image (ER Diagram)? |
# |
Dec 19th 2019, 05:10 |
yadav.manu36 |
Hi All Good morning |