1 | <?php namespace Arcanesoft\Blog; |
||
12 | class Blog |
||
13 | { |
||
14 | /* ----------------------------------------------------------------- |
||
15 | | Properties |
||
16 | | ----------------------------------------------------------------- |
||
17 | */ |
||
18 | |||
19 | /** |
||
20 | * Indicates if migrations will be run. |
||
21 | * |
||
22 | * @var bool |
||
23 | */ |
||
24 | public static $runsMigrations = true; |
||
25 | |||
26 | protected static $instance = null; |
||
27 | |||
28 | /* ----------------------------------------------------------------- |
||
29 | | Main Methods |
||
30 | | ----------------------------------------------------------------- |
||
31 | */ |
||
32 | |||
33 | /** |
||
34 | * Get the blog instance. |
||
35 | * |
||
36 | * @return Blog |
||
37 | */ |
||
38 | public static function instance() |
||
39 | { |
||
40 | if (is_null(static::$instance)) { |
||
41 | static::$instance = new static; |
||
42 | } |
||
43 | |||
44 | return static::$instance; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Publish the migrations. |
||
49 | */ |
||
50 | public static function publishMigrations() |
||
54 | |||
55 | /** |
||
56 | * Register the public blog routes. |
||
57 | */ |
||
58 | public static function routes() |
||
69 | |||
70 | /** |
||
71 | * Check if the blog is translatable. |
||
72 | * |
||
73 | * @return bool |
||
74 | */ |
||
75 | public function isTranslatable() |
||
76 | { |
||
77 | return config('arcanesoft.blog.translatable.enabled', false); |
||
78 | } |
||
79 | |||
80 | /** |
||
81 | * Get the supported locales. |
||
82 | * |
||
83 | * @return array |
||
84 | */ |
||
85 | public function getSupportedLocalesKeys() |
||
93 | |||
94 | /** |
||
95 | * Check if the media manager is installed. |
||
96 | * |
||
97 | * @return bool |
||
98 | */ |
||
99 | 3 | public function isMediaManagerInstalled() |
|
100 | { |
||
101 | 3 | return array_key_exists('Arcanesoft\Media\MediaServiceProvider', app()->getLoadedProviders()); |
|
102 | } |
||
103 | |||
104 | protected function __clone() |
||
108 | } |
||
109 |