Category: Models & ORM

Cakephp use query builder in component

How to use Cakephp query builder in component? (PostutilsComponent.php)//controller public function blogPost($post_id = null) {     $this->set('recent_posts', $this->P


0 Answers

Category: CSS

CakePHP 3.0 creates themes

Hello, I would like to know if I can write themes for CakePHP. Is there a theme collection website to search for themes? If no, is there a tutorial about how to create themes for CakePHP 3.0? Thanks

#theme
0 Answers
kk
kk

2

Category: Views

CakePHP access user login status in view

I need CakePHP 3 to access user login status (is logged in or not) in view .ctp file. I'm unable to use AuthComponent or SessionComponent to retrieve user status. I wonder if there is a SessionHelp th

#user
2 Answers

Category: Javascript

CakePHP 3 how to AJAX submit form post data to API?

I have an email subscribe form on homepage, and I may like to use AJAX submit form data to an API endpoint instead of http post redirect. I have write a new action ApiController/userSubscribe():public

#ajax
1 Answers

Category: Views

CakePHP 2 download link from view using alternative file name

Hi Aero Coding:I have a project written in CakePHP 2 that provides pdf storage and sharing service to end users. The pdf name of download links are same as is the hash name in s3, and pdf file name wa

SOLVED #aws #s3 #pdf
1 Answers
Betts
Betts

2

Category: Views

Create dropdown list in CakePHP

I use CakePHP's form helper to generate <form></form> columns, but I didn't see a helper that is able to create dropdown list. I use foreach to list all possible options..<!-- in view /

SOLVED #select #htmlhelper
2 Answers
Lara
Lara

4

Category: Sessions

Problem when reading an associative array form Cookie

Cakephp returns an error when reading an associative array from Cookie. I have an CRM application that stores some clients data in cookie. <?php class ClientsController extends AppControll

#json #cookie
0 Answers

Category: Models & ORM

Update all records using updateAll() and SQL IN clause

I am using Cakephp 3 latest version and I want to update a gender column for multiple rows. I have studied the ORM documentation and I have no idea how to NOT use foreach loop to update multiple rows

SOLVED #sql #updateall
2 Answers
achao
achao

9

Category: Utility Classes

How to Hash::extract value from JSON data (utility class)

Accroding to Hash::extract() method, to retrieve data from arrays or object implementing with "Hash Path Syntax". For example:// Common Usage: $users = [ ['id' => 1, 'name' => 'mark']

#hash #extract #json
1 Answers
usabob
usabob

2

Category: Views

Cakephp 3 read config value in helper class

I want to read domain's settings (usually hostname) from app.php config file in DomainHelper. How to read a value from cakephp's config file? I need to get config settings to build up urls for publish

SOLVED #helper #configuration
1 Answers