Skip to content

ludoerider/cakephp-table-prefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

cakephp-table-prefix

Table or database prefix for CakePHP 5

Implement :

In Model\Table directory, Replace class "Table" by "PrefixedTable", and add "use App\Util\PrefixedTable;"

use App\Util\PrefixedTable;

class ArticlesTable extends PrefixedTable /*Table*/
{
  ...
}

In your Datasources configuration, add 'table_prefix' (app.php, or app_local.php ...)

'Datasources' => [
        'default' => [
            ...

            'table_prefix' => 'toto_',
        ],

About

For CakePHP 5 - table or database prefix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages