File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 5
5
use Illuminate \Support \Arr ;
6
6
use Illuminate \Support \Str ;
7
7
use Illuminate \Support \Fluent ;
8
+ use Yajra \DataTables \Html \HasAuthorizations ;
8
9
use Yajra \DataTables \Utilities \Helper ;
9
10
use Yajra \DataTables \Html \Editor \Fields \Field ;
10
11
11
12
class Editor extends Fluent
12
13
{
13
14
use HasEvents;
15
+ use HasAuthorizations;
16
+
14
17
const DISPLAY_LIGHTBOX = 'lightbox ' ;
15
18
const DISPLAY_ENVELOPE = 'envelope ' ;
16
19
const DISPLAY_BOOTSTRAP = 'bootstrap ' ;
@@ -20,7 +23,7 @@ class Editor extends Fluent
20
23
/**
21
24
* Editor constructor.
22
25
*
23
- * @param string $instance
26
+ * @param string|array $instance
24
27
*/
25
28
public function __construct ($ instance = 'editor ' )
26
29
{
@@ -37,6 +40,10 @@ public function __construct($instance = 'editor')
37
40
*/
38
41
public static function make ($ instance = 'editor ' )
39
42
{
43
+ if (is_array ($ instance )) {
44
+ $ instance = $ instance ['editor ' ] ?? 'editor ' ;
45
+ }
46
+
40
47
return new static ($ instance );
41
48
}
42
49
You can’t perform that action at this time.
0 commit comments