1. Go to this page and download the library: Download cakedc/utils library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cakedc / utils example snippets
$this->Model->importCSV('myFile.csv');
$this->Model->getImportErrors();
public function exists($id = null) {
if ($this->Behaviors->loaded('SoftDelete')) {
return $this->existsAndNotDeleted($id);
} else {
return parent::exists($id);
}
}
public function delete($id = null, $cascade = true) {
$result = parent::delete($id, $cascade);
if ($result === false && $this->Behaviors->enabled('SoftDelete')) {
return (bool)$this->field('deleted', array('deleted' => 1));
}
return $result;
}
App::import('Lib', 'Utils.Languages');
$Languages = new Languages();
$languageList = $Languages->lists();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.