# |
Sep 19th 2019, 05:28 |
Fastidius |
https://pastebin.com/9qPZ9Pwf |
# |
Sep 19th 2019, 05:27 |
adam282 |
Sure |
# |
Sep 19th 2019, 05:27 |
Fastidius |
preffered snippit place? pastebin? |
# |
Sep 19th 2019, 05:26 |
adam282 |
Possibly… |
# |
Sep 19th 2019, 05:26 |
Fastidius |
would a code snippet help identify? |
# |
Sep 19th 2019, 05:26 |
adam282 |
Generally, there would be a `find` statement in the function that builds the view. They might have used queryBuilder as well or even wrote the queries manually. |
# |
Sep 19th 2019, 05:25 |
adam282 |
Depends on how the built the queries. |
# |
Sep 19th 2019, 05:25 |
Fastidius |
Inherited a cakephp project and I am figuring it all out mostly but i seem to be missing a fundamental if someone can explain or point me at what im missing. Mysql select allows me to put in what fields etc so i can tailor my view to what i want to see....to do this in cake is actually done where? |
# |
Sep 19th 2019, 05:23 |
slackebot |
<adam282> |
# |
Sep 19th 2019, 05:22 |
admad |
define "does not work" |
# |
Sep 19th 2019, 05:17 |
adam282 |
Hm, so this does not work in `3.8`? ``` <?php echo $this->Time->format($user->created, 'M jS, Y g:iA'); ?> ``` |
# |
Sep 19th 2019, 05:10 |
javier.villanueva |
morning all |
# |
Sep 19th 2019, 02:24 |
itmpls |
n/m, probably `SqlServer` -> `Sqlserver` |
# |
Sep 19th 2019, 02:23 |
itmpls |
oh |
# |
Sep 19th 2019, 02:23 |
itmpls |
anyone know why `Database driver Cake\Database\Driver\SqlServer could not be found` is thrown even though the class clearly exists? Also, sqlsrv is installed and is in_array of `PDO::getAvailableDrivers()` but enabled doesn't get called bc it doesn't reach the class |
# |
Sep 18th 2019, 22:10 |
noel |
Nvm.. it must be late.. my eyes deceive me. |
# |
Sep 18th 2019, 22:05 |
daniel.upshaw |
Thank you for your input and help :slightly_smiling_face: |
# |
Sep 18th 2019, 22:04 |
noel |
The GET seems to work if I use an Accept header of `application/json` instead of the recommended `application/vnd.api+json` (which doesn't work, I get HTML back instead of json). |
# |
Sep 18th 2019, 22:01 |
noel |
I'm trying to get CrudJsonApi working. I can get data using a request URL ending in .json. E.g. `http://crud-test:8888/cocktails/1.json`, however it also says that I should be able to make that request without the `.json` if using the correct headers but I can't seem to get that to work. Also it says that specific validation errors will be shown but it's telling me there are validation errors without specifics. Any clues? |
# |
Sep 18th 2019, 21:47 |
daniel.upshaw |
I think it must not use fallbacks at all, for this case |
# |
Sep 18th 2019, 21:46 |
daniel.upshaw |
Yeah, it seems like I'll just need to be specific with the routes, instead of leveraging fallbacks |
# |
Sep 18th 2019, 21:46 |
dereuromark |
then instead of fallback set a custom route for /login inside. and you have your URL |
# |
Sep 18th 2019, 21:45 |
daniel.upshaw |
Lol that does load, if I use `['path' => '/auth']` |
# |
Sep 18th 2019, 21:45 |
daniel.upshaw |
`/auth/auth/login` |
# |
Sep 18th 2019, 21:44 |
daniel.upshaw |
I think that's going to be the only way, to scope it to a path |
# |
Sep 18th 2019, 21:44 |
daniel.upshaw |
Hmm, I'll check.. yeah maybe the idea will be to just rename my controllers and stuff |
# |
Sep 18th 2019, 21:44 |
dereuromark |
what if you use /auth as path, and then set /login inside it etc? |
# |
Sep 18th 2019, 21:42 |
daniel.upshaw |
I like to see `/auth/login` if possible |
# |
Sep 18th 2019, 21:42 |
daniel.upshaw |
Yeah same |
# |
Sep 18th 2019, 21:42 |
dereuromark |
but that doesnt sound like a good idea to me. |
# |
Sep 18th 2019, 21:42 |
dereuromark |
ah, or maybe you indeed overwrite root |
# |
Sep 18th 2019, 21:42 |
daniel.upshaw |
Hmmm |
# |
Sep 18th 2019, 21:42 |
dereuromark |
the plugins root, including /auth |
# |
Sep 18th 2019, 21:41 |
daniel.upshaw |
That's saying from the root, to use DashedRoutes as a fallback, right? But in the main app, since that fallbacks to DashedRoutes as well.... it never checks the plugin's fallback route |
# |
Sep 18th 2019, 21:40 |
daniel.upshaw |
Even if I have ```Router::plugin( 'Auth', ['path' => '/'], function (RouteBuilder $routes) { $routes->fallbacks(DashedRoute::class); } );``` |
# |
Sep 18th 2019, 21:40 |
daniel.upshaw |
`plugins/Auth/src/Controller/AuthController.php` ... and a `login()` method.... it won't see `/auth/login` |
# |
Sep 18th 2019, 21:39 |
daniel.upshaw |
So for example, I'm trying to learn the Authorization stuff, and I want it in a plugin.. Say I have plugins/Auth |
# |
Sep 18th 2019, 21:38 |
dereuromark |
i dont follow. plugins use the apps by default, they inherit. |
# |
Sep 18th 2019, 21:38 |
daniel.upshaw |
Might just make the Plugins use very specific routes, instead of leveraging DashedRoutes, if it won't be possible otherwise |
# |
Sep 18th 2019, 21:37 |
daniel.upshaw |
Wellll, isn't it ideal to modularize the plugins? |
# |
Sep 18th 2019, 21:36 |
dereuromark |
just make the plugin ignore its routes and set up plugin routes from your app, this way you can overwrite it. |