1: <?php
2:
3: namespace Laravella\Crud;
4:
5: use Laravella\Crud\Log;
6: use \Seeder;
7: use \DB;
8:
9: class SeedAssets extends CrudSeeder {
10:
11: public function run()
12: {
13: set_time_limit(0);
14:
15: DB::table('_db_assets')->delete();
16: DB::table('_db_page_assets')->delete();
17:
18: $assetGroupId = $this->addAssetType('default');
19:
20: $id = $this->addAsset('admintools.js', 'scripts', 'default', 'bottom');
21: $this->info('adding asset admintools.js');
22: $this->linkAssetPage($assetGroupId, '*');
23:
24: $id = $this->addAsset('ckeditor/ckeditor.js', 'scripts', 'default', 'bottom', 'ckeditor');
25: $this->info('adding asset ckeditor/ckeditor.js');
26: $this->linkAssetPage($assetGroupId, '*');
27:
28: $id = $this->addAsset('plugins.js', 'scripts', 'default', 'bottom');
29: $this->info('adding asset plugins.js');
30: $this->linkAssetPage($assetGroupId, '*');
31:
32: $id = $this->addAsset('main.js', 'scripts', 'default', 'bottom');
33: $this->info('adding asset main.js');
34: $this->linkAssetPage($assetGroupId, '*');
35:
36: $id = $this->addAsset('bootstrap.min.js', 'scripts', 'default', 'bottom', 'bootstrap');
37: $this->info('adding asset bootstrap.min.js');
38: $this->linkAssetPage($assetGroupId, '*');
39:
40: $id = $this->addAsset('google-analytics.js', 'scripts', 'default', 'bottom');
41: $this->info('adding asset google-analytics.js');
42: $this->linkAssetPage($assetGroupId, '*');
43:
44: $id = $this->addAsset('adminstyles.css', 'styles', 'default');
45: $this->info('adding asset adminstyles.css');
46: $this->linkAssetPage($assetGroupId, '*');
47:
48: $id = $this->addAsset('css/bootstrap.css', 'styles', 'default');
49: $this->info('adding asset main.css');
50: $this->linkAssetPage($assetGroupId, '*');
51:
52: $id = $this->addAsset('jquery-1.8.3.min.js', 'scripts', 'default', 'top', 'jquery', '1.8.3');
53: $this->info('adding asset jquery-1.8.3.min.js');
54: $this->linkAssetPage($assetGroupId, '*');
55:
56: $id = $this->addAsset('modernizr-2.6.2.min.js', 'scripts', 'default', 'top', 'modernizr', '2.6.2');
57: $this->info('adding asset modernizr-2.6.2.min.js');
58: $this->linkAssetPage($assetGroupId, '*');
59:
60: $id = $this->addAsset('jsonconvert.js', 'scripts', 'default', 'bottom');
61: $this->info('adding asset jsonconvert.js');
62: $this->linkAssetPage($assetGroupId, '*');
63: }
64:
65: }
66:
67: ?>