# |
Dec 11th 2017, 11:49 |
willem |
https://book.cakephp.org/3.0/en/development/routing.html#matching-specific-http-methods |
# |
Dec 11th 2017, 11:48 |
willem |
ah, well, it seemed it was because of the *->post* in the route. I had to add * ‘_method’ => ‘post’ * to the Router::url call |
# |
Dec 11th 2017, 11:45 |
neon1024 |
As your controller prefix folder will be `V1` here |
# |
Dec 11th 2017, 11:45 |
neon1024 |
Could be case sensitive, perhaps it’s `'prefix' => 'api/V1'` |
# |
Dec 11th 2017, 11:24 |
willem |
This is not working: ``` [ 'controller' => 'Applicants', 'action' => 'add', 'prefix' => 'api/v1', ] ``` |
# |
Dec 11th 2017, 11:24 |
willem |
how do i build an url when using a sub-prefix? for example : ``` Router::prefix('api', function (RouteBuilder $routes) { $routes->prefix('v1', function (RouteBuilder $routes) { $routes->post('/vacancies', ['controller' => 'Vacancies', 'action' => 'add']); } } ``` |
# |
Dec 11th 2017, 11:17 |
slackebot |
!ask |
# |
Dec 11th 2017, 11:17 |
slackebot |
Command sent from Slack by saeideng: |
# |
Dec 11th 2017, 11:16 |
saeideng |
there is a ghost here just !ask |
# |
Dec 11th 2017, 11:16 |
jkpatel291289 |
@stoykovnet what should i write there? |
# |
Dec 11th 2017, 11:12 |
khushal |
anybody home ? |
# |
Dec 11th 2017, 11:11 |
khushal |
hi |
# |
Dec 11th 2017, 11:11 |
khushal |
nobody here ? |
# |
Dec 11th 2017, 11:11 |
khushal |
hey ? |
# |
Dec 11th 2017, 11:10 |
khushal |
is anybody here ? |
# |
Dec 11th 2017, 10:51 |
neon1024 |
I’ll wait for it to be fixed then I guess |
# |
Dec 11th 2017, 10:51 |
neon1024 |
Thanks saeideng! |
# |
Dec 11th 2017, 10:50 |
stoykovnet |
@jkpatel291289 In the gist u shared, i see no associations in the TrucksTable initialize method :thinking_face: |
# |
Dec 11th 2017, 10:48 |
saeideng |
https://github.com/cakephp/cakephp/issues/11514 |
# |
Dec 11th 2017, 10:48 |
saeideng |
https://github.com/cakephp/cakephp/pull/11518 |
# |
Dec 11th 2017, 10:48 |
saeideng |
https://github.com/cakephp/cakephp/pull/11462 @neon1024 |
# |
Dec 11th 2017, 10:34 |
jkpatel291289 |
@spriz no worries, thanks for your help |
# |
Dec 11th 2017, 10:34 |
spriz |
I’m unsure then, unfortunately @jkpatel291289 |
# |
Dec 11th 2017, 10:33 |
jkpatel291289 |
@spriz so whare is the problem.. i have updated gist with related files. Please check. |
# |
Dec 11th 2017, 10:33 |
neon1024 |
Downgraded back to 3.5.5 to fix it |
# |
Dec 11th 2017, 10:33 |
neon1024 |
That the exception rendered is expecting exception and got an error, so probably a PHP 7.x |
# |
Dec 11th 2017, 10:32 |
neon1024 |
Something changed with the error middleware in 3.5.7? Updating from 3.5.5 to 3.5.7 gives me a fatal |
# |
Dec 11th 2017, 10:31 |
spriz |
and the “behaviors” of targetTable looks fine as wel |
# |
Dec 11th 2017, 10:31 |
spriz |
Ah yes, but the target table is `App\Model\Table\TrucksTable` so it looks good |
# |
Dec 11th 2017, 10:31 |
jkpatel291289 |
@spriz https://gist.github.com/jaynarayan89/19d08198af0412d7cf592d40e0b60447 |
# |
Dec 11th 2017, 10:28 |
jkpatel291289 |
strange-- it gives Cake\ORM\Association\BelongsTo |
# |
Dec 11th 2017, 10:27 |
spriz |
git the content of `debug($this->Lorryreceipts->Trucks)` |
# |
Dec 11th 2017, 10:27 |
spriz |
I just want to check if the relations are set up correctly |
# |
Dec 11th 2017, 10:26 |
jkpatel291289 |
i want to populate drop down |
# |
Dec 11th 2017, 10:26 |
spriz |
and check if it’s Cake\…\Table or it’s actually \App\Model\Trucks instance |
# |
Dec 11th 2017, 10:25 |
spriz |
try do debug `$this->Lorryreceipts->Trucks` |
# |
Dec 11th 2017, 10:25 |
jkpatel291289 |
does beforefind() apply on association ? $consignors = $consignees = $this->Lorryreceipts->Trucks->find('list', ['limit' => 200]); in my trucksTable class I have behavior that filter all find operation and return only trucks from current company.Which is working properly and i always get only current company's truck however when i fetch them for lorryreceipts that returns my unfiltered data from whole table. |
# |
Dec 11th 2017, 10:22 |
stoykovnet |
thank you very much*** |
# |
Dec 11th 2017, 10:18 |
spriz |
and path is `path: A path relative to the filesystem.root.` |
# |
Dec 11th 2017, 10:17 |
spriz |
`filesystem.root: (default ROOT . DS) Directory where files should be written to by default` |
# |
Dec 11th 2017, 10:17 |
spriz |
http://cakephp-upload.readthedocs.io/en/latest/configuration.html |