# |
Apr 18th 2017, 07:58 |
hmic |
there are ready made plugins available for both! |
# |
Apr 18th 2017, 07:58 |
hmic |
!tell slieth about awesome |
# |
Apr 18th 2017, 07:58 |
slieth |
But I have to handle facebook authentication aswell |
# |
Apr 18th 2017, 07:57 |
aiena |
oh will look into it |
# |
Apr 18th 2017, 07:57 |
slieth |
I've tried BasicAuthenticate |
# |
Apr 18th 2017, 07:57 |
slieth |
Hey guys, I'm trying to implement restful authentication for my api but I don't really know the way to go |
# |
Apr 18th 2017, 07:56 |
hmic |
I'm not sure about 2.x but there is an errorscontroller likely too, just not in your app but the cake libs dir probably, go figure! (if you copy it to your app dir you can change it, cake will pick it up, or just create a new one and extend this) |
# |
Apr 18th 2017, 07:55 |
aiena |
ok |
# |
Apr 18th 2017, 07:54 |
hmic |
check the default PagesController |
# |
Apr 18th 2017, 07:54 |
aiena |
I think so. I am wondering if I should make a separate error controller for all error pages |
# |
Apr 18th 2017, 07:54 |
hmic |
sure |
# |
Apr 18th 2017, 07:53 |
aiena |
can you have a controller without a model |
# |
Apr 18th 2017, 07:52 |
aiena |
if the original app devs did not care about conventions then there are almost no conventions (: |
# |
Apr 18th 2017, 07:50 |
aiena |
nods |
# |
Apr 18th 2017, 07:49 |
hmic |
and you get all the other good stuff too, like composer support which makes using third party libs a breeze |
# |
Apr 18th 2017, 07:49 |
aiena |
hmic, yes I know of cakes conventions I was learning cake from cake 3 though. I applied that knowledge to cake 2 seeing what changed etc. Still learning as I work on this |
# |
Apr 18th 2017, 07:49 |
hmic |
if you are starting new apps, don't base them on 2.x! especially the ORM got so much better with 3.x! |
# |
Apr 18th 2017, 07:48 |
hmic |
will save you time from day one! |
# |
Apr 18th 2017, 07:48 |
hmic |
thats not what we are saying. we are saying: learn cake and use it! |
# |
Apr 18th 2017, 07:48 |
aiena |
but I like cake I'll make a few other apps in it as practice |
# |
Apr 18th 2017, 07:48 |
aiena |
but I am pretty new to frameworks so a recode could also goof up |
# |
Apr 18th 2017, 07:47 |
aiena |
hmic, I agree if I had the time I would recode the whole thing |
# |
Apr 18th 2017, 07:46 |
hmic |
still admad is 100% correct: stop the crap! NOW |
# |
Apr 18th 2017, 07:46 |
hmic |
so if you change the select master_name ... to select $prefix_master_table.master_name you get it "right" at least. |
# |
Apr 18th 2017, 07:45 |
aiena |
hmic, honestly this is the first framework I'm actually using I am so used to PDO arrays |
# |
Apr 18th 2017, 07:45 |
hmic |
the third array hold the columns you select |
# |
Apr 18th 2017, 07:45 |
hmic |
for this to work your selected fields need to include the alias too |
# |
Apr 18th 2017, 07:45 |
hmic |
the second array holds the alias of the table you are querieing |
# |
Apr 18th 2017, 07:44 |
aiena |
hmic, nods, but I cant control conventions here inherited app |
# |
Apr 18th 2017, 07:44 |
hmic |
the first array holds the results, one numeric index per row |
# |
Apr 18th 2017, 07:44 |
hmic |
your resulting array would not look as weird |
# |
Apr 18th 2017, 07:44 |
hmic |
aiena, if you would build a query that adheres to the cake conventions |
# |
Apr 18th 2017, 07:43 |
adityapansari |
Any link to post data using jQuery. I have already that function in cakephp |
# |
Apr 18th 2017, 07:43 |
admad |
yes use find('first') if you want single record |
# |
Apr 18th 2017, 07:43 |
aiena |
if it is a select query returning only one row in cake 2 I can use `$model->find('first',[])` right ? |
# |
Apr 18th 2017, 07:43 |
birdy247 |
morning |
# |
Apr 18th 2017, 07:43 |
rrueco |
sorry for interruption :v: |
# |
Apr 18th 2017, 07:42 |
aiena |
admad anyway I think for this particular trivial case I can use find |
# |
Apr 18th 2017, 07:42 |
rrueco |
@admad : I made it working already by changing ...Form->create() INTO ...Form->create($user) |
# |
Apr 18th 2017, 07:40 |
aiena |
I dont have control over what my ancestors decided to do with the app so I need to work with it |
# |
Apr 18th 2017, 07:40 |
admad |
ok, hopefully someone else can help you |