Welcome Guest, Not a member yet? Register   Sign In
Factories in docs explained badly
#1

I'm trying to figure out how to use factories in CI4.
But the documentation is not up to par on explaining it.

For example here:https://codeigniter.com/user_guide/conce...ories.html

Code:
<?php

namespace Config;

use CodeIgniter\Config\Factory as BaseFactory;
use CodeIgniter\Filters\FilterInterface;

class Factories extends BaseFactory
{
    public $filters = [
        'instanceOf' => FilterInterface::class,
    ];
}

This example seems to be a mix of the Config/Factory.php and Factories.php files mentioned above the code.

Anyone here that can give a working example? Both files mentioned, and where do I place the Factories.php file? in app/Factories ?
Any help would be appreciated. Thanks.
Reply


Messages In This Thread
Factories in docs explained badly - by Ageir - 02-06-2021, 09:09 AM
RE: Factories in docs explained badly - by Ageir - 02-09-2021, 09:38 AM
RE: Factories in docs explained badly - by kenjis - 02-09-2021, 05:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB