1. Go to this page and download the library: Download dcardenasl/ci4-api-core 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/ */
dcardenasl / ci4-api-core example snippets
declare(strict_types=1);
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Api extends BaseConfig
{
public bool $searchEnabled = true;
public bool $searchUseFulltext = true; // MATCH AGAINST; false = LIKE
public int $searchMinLength = 0; // minimum query length
public int $paginationDefaultLimit = 20;
public int $paginationMaxLimit = 100;
}
declare(strict_types=1);
namespace Config;
use dcardenasl\Ci4ApiScaffolding\Config\BaseScaffoldingConfig;
use dcardenasl\Ci4ApiScaffolding\Config\ScaffoldingConfig;
class Scaffolding extends BaseScaffoldingConfig
{
public function build(): ScaffoldingConfig
{
return ScaffoldingConfig::defaults();
}
}