*/ public function toArray($request) { return [ 'name' => $this->name, 'is_active' => $this->type->check(), 'type' => get_class($this->type), 'config' => $this->type->toArray(), 'id' => $this->id, 'type_human' => $this->type::title(), 'links' => [ 'update' => route('fileshare.update', ['fileshare' => $this->getModel()]), ] ]; } /** * @return array */ public static function meta(): array { return [ 'default' => [ 'name' => '', 'type' => null, 'config' => null, ], 'types' => ConnectionType::forSelect(), 'links' => [ 'store' => route('fileshare.store'), ] ]; } }