1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php class OERPostUpload extends SimpleORMap { protected static function configure($config = []) { $config['db_table'] = 'oer_post_upload'; $config['belongs_to']['file'] = [ 'class_name' => File::class, 'foreign_key' => 'id', 'on_delete' => 'delete' ]; parent::configure($config); } }