add validator, optimizations

This commit is contained in:
ludo
2023-11-13 23:03:12 +01:00
parent 23ac0cedad
commit b86b043604
16 changed files with 207 additions and 230 deletions

View File

@@ -12,7 +12,7 @@ class ArticlesDataTable extends DataTable
{
public $model_name = 'articles';
public $sortedColumn = 2;
public $sortedColumn = 3;
public function query(Article $model)
{
@@ -99,15 +99,16 @@ class ArticlesDataTable extends DataTable
return [
Column::make('visible')->title('Visible')->searchable(false)->width(50),
Column::make('homepage')->title('Accueil')->searchable(false)->width(50),
Column::make('ref')->title('Ref'),
Column::make('article_nature.name')->title('Nature'),
Column::make('thumb')->title('')->searchable(false)->orderable(false)->width(40)->class('text-center'),
Column::make('name')->title('Nom'),
Column::make('tags2')->title('Tags')->searchable(false)->orderable(false),
Column::make('tags_count')->title('#Tag')->class('text-right')->searchable(false)->width(40),
// Column::make('tags2')->title('Tags')->searchable(false)->orderable(false),
// Column::make('tags_count')->title('#Tag')->class('text-right')->searchable(false)->width(40),
Column::make('categories_count')->title('#Ray')->class('text-right')->searchable(false)->width(40),
Column::make('offers_count')->title('#Ofr')->class('text-right')->searchable(false)->width(40),
Column::make('images_count')->title('#Pho')->class('text-right')->searchable(false)->width(40),
Column::make('images_count2')->title('#PhoH')->class('text-right')->searchable(false)->orderable(false)->width(40),
// Column::make('images_count')->title('#Pho')->class('text-right')->searchable(false)->width(40),
// Column::make('images_count2')->title('#PhoH')->class('text-right')->searchable(false)->orderable(false)->width(40),
$this->makeColumnButtons(),
];
}