I have this warning in CakePHP logs:
The following table objects used Cake \ ORM \ Table instead of the concrete class:
Job
Here is my controller class:
<?php
namespace App\Controller;
use App\Controller\AppController;
use Cake\ORM\TableRegistry;
class JobsController extends AppController
{
public $name = 'Jobs';
public function index()
{
$options = array(
'order' => array('Jobs.created' => 'desc'),
'limit' => 1
);
$getjobs = TableRegistry::get('Jobs');
$jobs = $getjobs->find('all',$options);
$this->set('jobs',$jobs);
}
}
Is there any other / better way to access my db and read data from it? I am using the latest version of CakePHP. This is my first time using it, so I would like to know if there is a better way for this interaction with MySQL.
Tachi source
share