diff --git a/Entities/Contact.php b/Entities/Contact.php index e2be22f..d54a8f9 100755 --- a/Entities/Contact.php +++ b/Entities/Contact.php @@ -58,14 +58,12 @@ public function fields(Blueprint $table = null): void */ public function structure($structure): array { - $structure = [ - 'table' => ['name', 'phone', 'published'], - 'form' => [ - ['label' => 'Name', 'class' => 'w-full', 'fields' => ['name']], - ['label' => 'Contact', 'class' => 'w-1/2', 'fields' => ['phone', 'ordering', 'published']], - ], - 'filter' => ['name', 'phone', 'published'], + $structure['table'] = ['name', 'phone', 'published']; + $structure['form'] = [ + ['label' => 'Name', 'class' => 'col-span-full', 'fields' => ['name']], + ['label' => 'Contact', 'class' => 'col-span-6', 'fields' => ['phone', 'ordering', 'published']], ]; + $structure['filter'] = ['name', 'phone', 'published']; return $structure; } diff --git a/Entities/Gateway.php b/Entities/Gateway.php index 90da752..71365f8 100755 --- a/Entities/Gateway.php +++ b/Entities/Gateway.php @@ -58,14 +58,12 @@ public function fields(Blueprint $table = null): void */ public function structure($structure): array { - $structure = [ - 'table' => ['name', 'url', 'ordering', 'published'], - 'form' => [ - ['label' => 'Name', 'class' => 'w-full', 'fields' => ['name']], - ['label' => 'Contact', 'class' => 'w-1/2', 'fields' => ['url', 'ordering', 'published']], - ], - 'filter' => ['name', 'url', 'published'], + $structure['table'] = ['name', 'url', 'ordering', 'published']; + $structure['form'] = [ + ['label' => 'Name', 'class' => 'col-span-full', 'fields' => ['name']], + ['label' => 'Contact', 'class' => 'col-span-6', 'fields' => ['url', 'ordering', 'published']], ]; + $structure['filter'] = ['name', 'url', 'published']; return $structure; } diff --git a/Entities/Outgoing.php b/Entities/Outgoing.php index 180dfcf..acfb75d 100755 --- a/Entities/Outgoing.php +++ b/Entities/Outgoing.php @@ -57,14 +57,12 @@ public function fields(Blueprint $table = null): void */ public function structure($structure): array { - $structure = [ - 'table' => ['phone', 'sms', 'is_sent'], - 'form' => [ - ['label' => 'Phone', 'class' => 'w-full', 'fields' => ['phone']], - ['label' => 'Contact', 'class' => 'w-1/2', 'fields' => [ 'sms', 'is_sent']], - ], - 'filter' => ['phone', 'is_sent'], + $structure['table'] = ['phone', 'sms', 'is_sent']; + $structure['form'] = [ + ['label' => 'Phone', 'class' => 'col-span-full', 'fields' => ['phone']], + ['label' => 'Contact', 'class' => 'col-span-6', 'fields' => ['sms', 'is_sent']], ]; + $structure['filter'] = ['phone', 'is_sent']; return $structure; } diff --git a/Entities/Signature.php b/Entities/Signature.php index 5595c06..2f226be 100755 --- a/Entities/Signature.php +++ b/Entities/Signature.php @@ -45,7 +45,7 @@ class Signature extends BaseModel public function fields(Blueprint $table = null): void { $this->fields = $table ?? new Blueprint($this->table); - + $this->fields->increments('id')->html('text'); $this->fields->char('title', 255)->html('text'); $this->fields->string('signature')->html('textarea'); @@ -58,14 +58,12 @@ public function fields(Blueprint $table = null): void */ public function structure($structure): array { - $structure = [ - 'table' => ['title', 'signature', 'ordering', 'published'], - 'form' => [ - ['label' => 'Title', 'class' => 'w-full', 'fields' => ['title']], - ['label' => 'Contact', 'class' => 'w-1/2', 'fields' => ['signature', 'ordering', 'published']], - ], - 'filter' => ['title', 'signature', 'published'], + $structure['table'] = ['title', 'signature', 'ordering', 'published']; + $structure['form'] = [ + ['label' => 'Title', 'class' => 'col-span-full', 'fields' => ['title']], + ['label' => 'Contact', 'class' => 'col-span-6', 'fields' => ['signature', 'ordering', 'published']], ]; + $structure['filter'] = ['title', 'signature', 'published']; return $structure; }