# |
Oct 22nd 2019, 23:13 |
Fastidius |
in the controller |
# |
Oct 22nd 2019, 23:13 |
Fastidius |
seems to be what im looking for but i'm unsure on how to do the if/HTML linking |
# |
Oct 22nd 2019, 23:12 |
Fastidius |
{{count}} total, starting on record {{start}}, ending on {{end}}' |
# |
Oct 22nd 2019, 23:12 |
Fastidius |
); |
# |
Oct 22nd 2019, 23:12 |
Fastidius |
'Page {{page}} of {{pages}}, showing {{current}} records out of |
# |
Oct 22nd 2019, 23:12 |
Fastidius |
echo $this->Paginator->counter( |
# |
Oct 22nd 2019, 23:12 |
dereuromark |
sure you can do that as logic once the result is there in the controller, and redirect |
# |
Oct 22nd 2019, 23:08 |
Fastidius |
i have a search which is adjusting the select for paginator. Is there a way to automatically do something if paginate only sees 1 record? something like if Paginate record count = 1 open view screen using ID from that record? |
# |
Oct 22nd 2019, 20:09 |
daniel.upshaw |
I've been really struggling with this as you might be able to tell, haha |
# |
Oct 22nd 2019, 20:08 |
daniel.upshaw |
Your Bash script can just `source .env` and it can, say for example, utilize the Slack API key to send alerts..... really handy! |
# |
Oct 22nd 2019, 20:07 |
daniel.upshaw |
So once I got used to being able to conveniently access the config from Docker, Vagrant, Ansible, Bash, other apps, and it's all tidy in there... and scalable to stuff like Hashicorp Vault etc.... finding out people's issues with it, has become a real roadblock to putting it in practice |
# |
Oct 22nd 2019, 20:04 |
daniel.upshaw |
It's really puzzling to me because I found that aspect of them to be really appealing |
# |
Oct 22nd 2019, 20:04 |
daniel.upshaw |
If you have two applications that need to be able to pull some common config.... then it's right there, and DRY, all in one place |
# |
Oct 22nd 2019, 20:03 |
daniel.upshaw |
Well there are so many other benefits... e.g., Bash can natively read .env |
# |
Oct 22nd 2019, 20:02 |
admad |
no, just don't use env vars |
# |
Oct 22nd 2019, 20:01 |
daniel.upshaw |
This would scope it to the application... more secure, yes? |
# |
Oct 22nd 2019, 20:01 |
daniel.upshaw |
True.... although then it puts them global to the whole environment |
# |
Oct 22nd 2019, 20:01 |
admad |
or unless you are going to deploy on cloud providers which use env vars don't use .env files at all :slightly_smiling_face: |
# |
Oct 22nd 2019, 19:58 |
daniel.upshaw |
Interesting concept here: https://github.com/jchook/dotenv-to-php |
# |
Oct 22nd 2019, 18:44 |
luizcmarin |
yes. bootstrap.php |
# |
Oct 22nd 2019, 18:42 |
admad |
@luizcmarin update "use" statement in you app's `config/bootstrap.php` |
# |
Oct 22nd 2019, 18:41 |
ndm |
99.9% chance it's in bootstrap.php |
# |
Oct 22nd 2019, 18:40 |
luizcmarin |
ah, ok. |
# |
Oct 22nd 2019, 18:40 |
ricksaccous |
you need to find it in your app code |
# |
Oct 22nd 2019, 18:40 |
ricksaccous |
you don't want to touch that |
# |
Oct 22nd 2019, 18:40 |
ricksaccous |
that's the core code |
# |
Oct 22nd 2019, 18:39 |
luizcmarin |
... and now? |
# |
Oct 22nd 2019, 18:39 |
luizcmarin |
<?php declare(strict_types=1); class_alias( 'Cake\Error\ConsoleErrorHandler', 'Cake\Console\ConsoleErrorHandler' ); deprecationWarning( 'Use Cake\Error\ConsoleErrorHandler instead of Cake\Console\ConsoleErrorHandler.' ); |
# |
Oct 22nd 2019, 18:39 |
luizcmarin |
ok. localized |
# |
Oct 22nd 2019, 18:38 |
daniel.upshaw |
Thank you :slightly_smiling_face: |
# |
Oct 22nd 2019, 18:38 |
daniel.upshaw |
I did not see this before |
# |
Oct 22nd 2019, 18:38 |
daniel.upshaw |
Oh! This is awesome |
# |
Oct 22nd 2019, 18:38 |
daniel.upshaw |
https://github.com/CakeDC/users-example/tree/develop-extend-plugin |
# |
Oct 22nd 2019, 18:37 |
daniel.upshaw |
Yes, I followed the instructions there |
# |
Oct 22nd 2019, 18:33 |
ricksaccous |
that's the wrong place to look, just do a grep for Cake\Console\ConsoleErrorHandler |
# |
Oct 22nd 2019, 18:31 |
luizcmarin |
@ricksaccous do what in this line? |
# |
Oct 22nd 2019, 18:30 |
slackebot1 |
<luizcmarin> |
# |
Oct 22nd 2019, 18:28 |
ricksaccous |
to* |
# |
Oct 22nd 2019, 18:28 |
ricksaccous |
just update that thing it's telling you too ;) |
# |
Oct 22nd 2019, 18:25 |
luizcmarin |
I just updated cake4 and got this message. Everything is OK? |
# |
Oct 22nd 2019, 18:24 |
slackebot1 |
<luizcmarin> |