# |
Apr 4th 2019, 14:17 |
ricksaccous |
also does the user have write access |
# |
Apr 4th 2019, 14:17 |
ricksaccous |
@weto.jc does the user have read access to the db? |
# |
Apr 4th 2019, 14:17 |
asdfgh |
ok |
# |
Apr 4th 2019, 14:16 |
admad |
asdfgh: that works too |
# |
Apr 4th 2019, 14:16 |
ricksaccous |
also the error you got that you posted i think just said that the user didn't have permission to that db |
# |
Apr 4th 2019, 14:15 |
ricksaccous |
@weto.jc what did you name the database? |
# |
Apr 4th 2019, 14:12 |
asdfgh |
admad yes, but now i have a doubt...if why is bette rto store the foreign_key in users that point to agents (for example) instead of using the user_id column in agents ? |
# |
Apr 4th 2019, 14:11 |
weto.jc |
@ricksaccous I created the database and entered the data with Docker, the database and the tables were created correctly. |
# |
Apr 4th 2019, 14:11 |
admad |
store the role/type too in users table along with foreign key |
# |
Apr 4th 2019, 14:10 |
asdfgh |
using user_id in agents, companies and so on ? |
# |
Apr 4th 2019, 14:10 |
asdfgh |
admad yes ok, nbut then how can i "link" the users to a specific table? |
# |
Apr 4th 2019, 14:09 |
admad |
using single table to hold authentication info is the right approache |
# |
Apr 4th 2019, 14:08 |
asdfgh |
guys how can i handle login from different types (roles) of users? i have agents,companies, administrators etc at the moment i have a column named foreign_key where i store the ID of the users in other tables (Agents, companies) but i do not know if it is the best approach |
# |
Apr 4th 2019, 14:06 |
ricksaccous |
@weto.jc did you create an actual schema? |
# |
Apr 4th 2019, 14:04 |
weto.jc |
@rochasmarcelo This way I can connect to the database (native php) |
# |
Apr 4th 2019, 13:54 |
rochasmarcelo |
@weto.jc I don't see database name here ''host' => 'meubanco', 'login' => 'admin', 'password' => '123456',' |
# |
Apr 4th 2019, 13:43 |
ricksaccous |
welp i learned something today |
# |
Apr 4th 2019, 13:40 |
ricksaccous |
thanks lol |
# |
Apr 4th 2019, 13:40 |
neon1024 |
LMGTFY |
# |
Apr 4th 2019, 13:40 |
neon1024 |
https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89 |
# |
Apr 4th 2019, 13:39 |
neon1024 |
So you don’t load an entire result set |
# |
Apr 4th 2019, 13:39 |
neon1024 |
A cursor is like an offset |
# |
Apr 4th 2019, 13:38 |
ricksaccous |
just curious, haven't developed it |
# |
Apr 4th 2019, 13:38 |
ricksaccous |
like the load more types as you scroll or something? |
# |
Apr 4th 2019, 13:38 |
neon1024 |
Did anyone ever developer a cursor paginator for Cake? |
# |
Apr 4th 2019, 13:37 |
admad |
:bulb: |
# |
Apr 4th 2019, 13:37 |
neon1024 |
Oh right |
# |
Apr 4th 2019, 13:36 |
admad |
i presume you know how to get controller name from request instance :slightly_smiling_face: |
# |
Apr 4th 2019, 13:36 |
ricksaccous |
hehe |
# |
Apr 4th 2019, 13:36 |
ricksaccous |
https://api.cakephp.org/3.7/class-Cake.View.View.html#_getRequest |
# |
Apr 4th 2019, 13:36 |
ricksaccous |
yeah |
# |
Apr 4th 2019, 13:36 |
admad |
@neon1024 View class gets the request instance |
# |
Apr 4th 2019, 13:34 |
admad |
so set memcache and fallback for array and if not present in memcache too the ORM will query db |
# |
Apr 4th 2019, 13:34 |
ricksaccous |
misunderstood |
# |
Apr 4th 2019, 13:34 |
neon1024 |
Cake View class must know |
# |
Apr 4th 2019, 13:34 |
admad |
@val you can have fallback engine in cache configs |
# |
Apr 4th 2019, 13:34 |
ricksaccous |
ohhh my bad |
# |
Apr 4th 2019, 13:33 |
neon1024 |
As the implementation of View classes isn’t related |
# |
Apr 4th 2019, 13:33 |
neon1024 |
Which leads us back to my original question. |
# |
Apr 4th 2019, 13:33 |
neon1024 |
With a single view class I can set it in the prefixes app controller |
# |
Apr 4th 2019, 13:33 |
ricksaccous |
or whatever the method to set view class is |