diff --git a/app/Http/Controllers/Admin/DocumentCrudController.php b/app/Http/Controllers/Admin/DocumentCrudController.php index cf823a0f..6b95e6dc 100755 --- a/app/Http/Controllers/Admin/DocumentCrudController.php +++ b/app/Http/Controllers/Admin/DocumentCrudController.php @@ -120,6 +120,12 @@ protected function setupCreateOperation() 'label' => 'Max size (KBytes)', 'default' => 0 ], + [ + 'name' => 'order', + 'type' => 'number', + 'label' => 'Order', + 'default' => 0 + ], [ // Checkbox 'name' => 'business', 'label' => 'Enterpreneurs', diff --git a/app/Models/Document.php b/app/Models/Document.php index dd5eb18f..00860e73 100755 --- a/app/Models/Document.php +++ b/app/Models/Document.php @@ -29,7 +29,8 @@ class Document extends Model 'max_size', 'business', 'company', - 'all_country' + 'all_country', + 'order' ]; // protected $hidden = []; // protected $dates = []; diff --git a/database/migrations/2022_09_26_063449_alter_documents_table.php b/database/migrations/2022_09_26_063449_alter_documents_table.php index 871fb53a..d7217626 100644 --- a/database/migrations/2022_09_26_063449_alter_documents_table.php +++ b/database/migrations/2022_09_26_063449_alter_documents_table.php @@ -17,6 +17,7 @@ public function up() $table->boolean('business')->default(0); $table->boolean('company')->default(0); $table->boolean('all_country')->default(0); + $table->integer('order')->default(0); }); } @@ -30,7 +31,8 @@ public function down() Schema::table('documents', function (Blueprint $table) { $table->dropColumn('business'); $table->dropColumn('company'); -// $table->dropColumn('all_country'); + $table->dropColumn('all_country'); +// $table->dropColumn('order'); }); } };