Welcome Guest, Not a member yet? Register   Sign In
Entity allowed fields/attributes
#1

(This post was last modified: 03-01-2023, 05:35 AM by [email protected]. Edit Reason: For better understanding )

Hi. Please help me on how to make entity.
Lets say i have user entity, then i have an array of name, address, email. Is there a way to make only allowed fields/attributes (lets say only name and email) will be filled when passing that array.
Maybe similiar to allowedFields on model feature.
Reply
#2

refer here https://codeigniter.com/user_guide/model...ght=entity
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#3

(This post was last modified: 03-05-2023, 06:04 PM by kenjis. Edit Reason: Remove BB tags. )

I want to know too
Reply
#4

(03-02-2023, 01:09 AM)luckmoshy Wrote: refer hereĀ  https://codeigniter.com/user_guide/model...ght=entity

Thanks. But is there a way provided by CI for example to use method fill but discards non matching property in the array passed.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB