# |
Jul 10th 2017, 07:20 |
voycey |
but in Cake 2 it is App::uses |
# |
Jul 10th 2017, 07:20 |
voycey |
You can just simply use include |
# |
Jul 10th 2017, 06:42 |
cakephp143 |
I have to use it in a plugin |
# |
Jul 10th 2017, 06:41 |
cakephp143 |
I create a lib and/or a Component, but I cant use it |
# |
Jul 10th 2017, 06:41 |
cakephp143 |
in cake 2 how to include some utilities in my controllers? |
# |
Jul 10th 2017, 06:40 |
cakephp143 |
hi all |
# |
Jul 10th 2017, 00:57 |
flashios09 |
@thomasnucleus np |
# |
Jul 10th 2017, 00:57 |
thomasnucleus |
Thanks so much |
# |
Jul 10th 2017, 00:57 |
thomasnucleus |
jeez |
# |
Jul 10th 2017, 00:57 |
thomasnucleus |
I just realised I changed the default app_form templates ages ago |
# |
Jul 10th 2017, 00:57 |
thomasnucleus |
o MY |
# |
Jul 10th 2017, 00:56 |
flashios09 |
``` ``` |
# |
Jul 10th 2017, 00:51 |
flashios09 |
this `?= $this->Form->control('expiry_date', ['type' => 'datetime']); ?` will be converted to this: |
# |
Jul 10th 2017, 00:50 |
flashios09 |
@thomasnucleus it works for me |
# |
Jul 10th 2017, 00:43 |
flashios09 |
one min i will take a look at the doc |
# |
Jul 10th 2017, 00:43 |
flashios09 |
@thomasnucleus i haven’t used postgres before but i’m sure that you can have a date time field using the form helper |
# |
Jul 10th 2017, 00:40 |
thomasnucleus |
My input: ?= $this->Form->control('expiry_date', ['type' => 'datetime']); ? |
# |
Jul 10th 2017, 00:40 |
thomasnucleus |
I'm trying to set a form input to a 'timestamp' type, however it just displays a text input. I tried 'datetime' as well but that doesn't give me the hour and minute inputs. My field type in my postgres database is timestamp without timezone. How come the 'timestamp' and 'datetime' types aren't working? |
# |
Jul 10th 2017, 00:39 |
flashios09 |
@sdevore thanks but i don’t want to *switch* between them, i want to use php5.x for cakephp2 project and php7.x for cakephp3 project, maybe the port(eg. 80 for php7 and 8080 for php5) can be a solution, i will try and see |
# |
Jul 10th 2017, 00:22 |
sdevore |
@flashios09 something like this? https://askubuntu.com/questions/50344/how-to-have-two-versions-of-php-installed-and-switch-easily-between-them |
# |
Jul 9th 2017, 23:02 |
flashios09 |
@lorenzo thanks but i don’t like docker |
# |
Jul 9th 2017, 20:19 |
lorenzo |
docker is like having virtual machines in your server, so you can run any version you need |
# |
Jul 9th 2017, 20:18 |
lorenzo |
I’d suggest using docker for that |
# |
Jul 9th 2017, 19:03 |
flashios09 |
i’m using php fpm + nginx on ubuntu 16.04 |
# |
Jul 9th 2017, 19:02 |
flashios09 |
is it possible to have two php versions(5.x and 7.x), then force the cakephp2 project to use php5.x and cakephp3 project to use 7.x ? |
# |
Jul 9th 2017, 19:01 |
flashios09 |
hi |
# |
Jul 9th 2017, 18:53 |
admad |
np |
# |
Jul 9th 2017, 18:53 |
manuweg |
sorry and thanks |
# |
Jul 9th 2017, 18:53 |
manuweg |
I had App in the namespace |
# |
Jul 9th 2017, 18:53 |
manuweg |
foolish me |
# |
Jul 9th 2017, 18:52 |
admad |
do you admin and non admin controller classes have proper namespace? |
# |
Jul 9th 2017, 18:50 |
manuweg |
Any ideas? |
# |
Jul 9th 2017, 18:49 |
manuweg |
the line that is quoted for causing the error is at the very end of the controller |
# |
Jul 9th 2017, 18:48 |
manuweg |
I am not redeclaring the class |
# |
Jul 9th 2017, 18:48 |
manuweg |
Fatal error: Cannot redeclare class Shop\App\Controller\ProductsController in /Users/wegmershaus/Dropbox/Websites/public_html/cttpcake/plugins/Shop/src/Controller/ProductsController.php on line 38 |
# |
Jul 9th 2017, 18:47 |
manuweg |
I get a fatal error for the non-admin controller functions |
# |
Jul 9th 2017, 18:47 |
manuweg |
sorry the other way around - the admin methods work fine |
# |
Jul 9th 2017, 18:47 |
manuweg |
the non-admin methods that I have baked work fine |
# |
Jul 9th 2017, 18:47 |
manuweg |
I have a plugin which has admin and non-admin methods |
# |
Jul 9th 2017, 16:34 |
smarty24 |
Hi CakePHPers, I would like to know how many parameters does the GET method from the AppController take? I am trying to return an ID and Token |
# |
Jul 8th 2017, 19:35 |
bordplate |
``` class UsersControllerTest extends IntegrationTestCase { public function setUp() { parent::setUp(); } public function testIndex() { $this->get('/'); $this->assertResponseOk(); } } ``` This is the test I’m trying to run. |