0

I have some data to share in application but its not that much that I should use a database table. I was wondering, can I create an array in model and then from Controllers getting data form that array?

I have some types of users on website. These users sometimes have different main page (other modules) and I want to create an array $modules[userType][moduleArray];

Cheers

1 Answer 1

1

Absolutely. Take a look at the CakePHP cookbook entry on data sources. You’ll want to create a private property to hold your data, and implement the read/write methods to pop/push to your array as appropriate.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.