以éã®èª¬æã¯ãUser has many Posts / Post belongs to User ã¨ãªã£ã¦ããã¢ã½ã·ã¨ã¼ã·ã§ã³é¢ä¿ã§ã®ä¾ã§ãã Posts ã«é¢é£ãã Users ã®ãã¼ã¿ãåå¾ãã Posts ä¸è¦§ã«é¢é£ãã Users ãåæã«å¼ã£å¼µã£ã¦ããä¾ã§ãã src/Controller/HomeController.php <?php namespace App\Controller; use Cake\ORM\TableRegistry; class HomeController extends AppController { public function index() { $posts_table = TableRegistry::get('Posts'); $posts = $posts_table ->find() ->contain(['Users']) ->
{{#tags}}- {{label}}
{{/tags}}