1: <?php namespace Laravella\Crud;
2:
3: use Laravella\Crud\Log;
4: use \Seeder;
5: use \DB;
6: use \Config;
7:
8: class SeedOptions extends CrudSeeder {
9:
10: public function run()
11: {
12: $skin = Config::get('app.skin');
13:
14: DB::table('_db_option_types')->delete();
15: DB::table('_db_options')->delete();
16:
17: $optionTypeId = $this->addOptionType('database');
18: $adminId = $this->addOptionType('admin');
19:
20: $this->addOption($adminId, 'skin', $skin);
21: $this->addOption($adminId, 'debug', '0');
22: $this->addOption($adminId, 'configure', '1');
23: $this->addOption($adminId, 'show-pk-tables', '0');
24: $this->addOption($adminId, 'show-fk-tables', '0');
25: $this->addOption($adminId, 'attach-params', '0');
26: $this->addOption($adminId, 'default-view', "skins::$skin.dbview");
27:
28: $assetPosId = $this->addOptionType('asset-pos', $adminId);
29: $this->addOption($assetPosId, 'asset-pos-top', 'top');
30: $this->addOption($assetPosId, 'asset-pos-bottom', 'bottom');
31:
32:
33: $ulId = $this->addOptionType('upload', $adminId);
34: $ivId = $this->addOptionType('image_versions', $ulId);
35: $this->addOptionType('medium', $ivId);
36: $this->addOptionType('thumbnail', $ivId);
37:
38: $optionTypeId = $this->addOptionType('frontend');
39: $this->addOption($optionTypeId, 'skin', $skin);
40: $this->addOption($optionTypeId, 'default-view', "skins::$skin.frontview");
41:
42: $optionTypeId = $this->addOptionType('installation');
43: $this->addOption($optionTypeId, 'status', 0);
44:
45:
46: $this->addOption($optionTypeId, 'site_root', base_path());
47: }
48:
49: }
50:
51: ?>