CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. It uses commonly known design patterns like MVC and ORM within the convention over configuration paradigm.

learn more… | top users | synonyms

3
votes
1answer
33 views

CakePHP static pages (without entity) but with dynamic content

I have a few pages that is not connected with entities (index page, terms of use page, email page). Detailed description: In CakePHP, when you want to have a static page (such as index for example), ...
2
votes
0answers
48 views

Change the limit from CakePHP 3 Paginator by click in link inside an <option>

I'm using the CakePHP 3.0 to paginate some content, but I can't find a way to change the limit (user on browser choose the limit of content displayed on screen) using ...
2
votes
1answer
43 views

Using Cache::remember for banners and stores

I'm using Cache::remember to cache 3 results in my action, 2 in the same call to Cache::remember. It works, but I have 2 ...
2
votes
0answers
56 views

Controller method to add a product, stored across three database tables

I have some questions on how I can improve this "add" action method in a controller. Using a single form, the user can upload a product to be displayed on the site. A Product is composed of three ...
1
vote
1answer
50 views

CakePHP login action returning json

I have some questions on how I can improve this "add action" (method) in "controller": I'm using the add action only if post request. Is it correct? This ...
4
votes
1answer
75 views

CakePHP change 'miniMap' action and respect template

I have some questions on how I can improve this "action" (method) in "controller": My template has a navbar with dynamic content (if the user is logged in a special button appears, his name appears ...
1
vote
1answer
103 views

CakePHP image upload component

I would like to know how I can improve this CakePHP 3.0 Component (inside folder controller) 1st: to use external libs (stored on vendor folder) I'm using the ...
0
votes
1answer
37 views

Better way to validate user input in cakephp

I'm trying to find a way to make my code easeier to read, so i found that major part of the code is validation trough if, ifelse: ...
1
vote
1answer
35 views

CakePHP Membership Management

I have a 'Membership' model that keeps track of a Member's membership. A membership can be updated by an admin (admin_add), or by the user (update). This code is working great, but I'd love some ...
3
votes
2answers
121 views

CakePHP view with interleaved PHP and HTML

It's CakePHP, though I'm more interested in what people think about the layout of the indentation, the mark-up, position of logic etc. Any feedback that relates to the subject of writing CakePHP ...
3
votes
2answers
142 views

Can I make this admin method in CakePHP more streamlined?

I have a VenuesController and an EventsController. My venues controller has an admin_add ...
2
votes
1answer
194 views

CakePHP Ticket Component

I have the following code that allows easy creation, pulling, and deletion of Tickets in a CakePHP application. ...
3
votes
1answer
151 views

How to optimize the pagination query?

This is completely optimization question, I have a pagination query like that ...
2
votes
1answer
785 views

CakePHP return url validator

I have the following snippet of code that redirects a user to a specific page on successful login to the application. ...
3
votes
0answers
467 views

CakePHP Best strategy for getting HABTM data in multiple ways within the same tool

School HABTM AthleticDirector I am building a tool for assigning athletic directors (ADs) to schools. The tool has a school menu/filter which, when selected, shows a list of ADs already assigned to ...
2
votes
1answer
551 views

Is there a better way to loop through records and call an api?

I have a CakePHP function here that gets info for a twitter screen_name from the twitter api and writes it to a mysql db. I'm just looking for feedback about other ways to accomplish this that might ...
5
votes
1answer
610 views

CakePHP 2.x Custom PagesController & Routing

I want to direct all requests that haven't got a valid controller action to my custom page controller. I.e. I want /pages/new & ...
2
votes
2answers
86 views

methods in the class so close in what they do

I have this class that has these two methods that are so closely related to the each other. I do not want to pass the flags so I kept them separate. I was wondering if there is a way to rewrite it so ...
2
votes
2answers
873 views

Flexible and modular CMS with user management in CakePHP

Please review my database design: I think it is quite self-explanatory, but to be absolutely clear: My goal is to make an application which has a super flexible user management (which is why the ...
2
votes
3answers
455 views

Using CakePHP models/controllers properly

I'd like to know if I'm doing this properly. Basically, I have 3 models: Student, Course, ...