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 55use Illuminate \Support \Arr ;
66use Illuminate \Support \Str ;
77use Illuminate \Support \Fluent ;
8+ use Yajra \DataTables \Html \HasAuthorizations ;
89use Yajra \DataTables \Utilities \Helper ;
910use Yajra \DataTables \Html \Editor \Fields \Field ;
1011
1112class Editor extends Fluent
1213{
1314 use HasEvents;
15+ use HasAuthorizations;
16+
1417 const DISPLAY_LIGHTBOX = 'lightbox ' ;
1518 const DISPLAY_ENVELOPE = 'envelope ' ;
1619 const DISPLAY_BOOTSTRAP = 'bootstrap ' ;
@@ -20,7 +23,7 @@ class Editor extends Fluent
2023 /**
2124 * Editor constructor.
2225 *
23- * @param string $instance
26+ * @param string|array $instance
2427 */
2528 public function __construct ($ instance = 'editor ' )
2629 {
@@ -37,6 +40,10 @@ public function __construct($instance = 'editor')
3740 */
3841 public static function make ($ instance = 'editor ' )
3942 {
43+ if (is_array ($ instance )) {
44+ $ instance = $ instance ['editor ' ] ?? 'editor ' ;
45+ }
46+
4047 return new static ($ instance );
4148 }
4249
You can’t perform that action at this time.
0 commit comments