orderBy query added to admin tables

This commit is contained in:
ilmedova 2021-04-28 17:28:45 +05:00
parent 1fa2069b70
commit 72f99f4e4e
20 changed files with 21 additions and 0 deletions

View File

@ -50,6 +50,8 @@ class AdvertisementCrudController extends CrudController
['name' => 'adv_type', 'type' => 'enum', 'label' => 'Adv Type'],
]);
$this->crud->orderBy('updated_at', 'DESC');
// add asterisk for fields that are required in AdvertisementRequest
$this->crud->setRequiredFields(StoreRequest::class, 'create');
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');

View File

@ -28,6 +28,7 @@ class CategoryCrudController extends CrudController
$this->crud->setEntityNameStrings('category', 'categories');
$this->crud->allowAccess('reorder');
$this->crud->enableReorder('name', 3);
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------
| CrudPanel Configuration

View File

@ -26,6 +26,7 @@ class FolderCrudController extends CrudController
$this->crud->setModel('App\Models\Folder');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/folders');
$this->crud->setEntityNameStrings('Bukja', 'bukjalar');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class GroupCrudController extends CrudController
$this->crud->setModel('App\Models\Group');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/group');
$this->crud->setEntityNameStrings('group', 'groups');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class GurnawCrudController extends CrudController
$this->crud->setModel('App\Models\Gurnaw');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/gurnawlar');
$this->crud->setEntityNameStrings('Gurnaw', 'Gurnawlar');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class MaterialCrudController extends CrudController
$this->crud->setModel('App\Models\Material');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/material');
$this->crud->setEntityNameStrings('material', 'materials');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class MenuCrudController extends CrudController
$this->crud->setModel('App\Models\Menu');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/menu');
$this->crud->setEntityNameStrings('menu', 'menus');
$this->crud->orderBy('updated_at', 'DESC');
/*

View File

@ -26,6 +26,7 @@ class NewsCrudController extends CrudController
$this->crud->setModel('App\Models\News');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/news');
$this->crud->setEntityNameStrings('news', 'news');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class OrderCrudController extends CrudController
$this->crud->setModel('App\Models\Order');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/order');
$this->crud->setEntityNameStrings('order', 'orders');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class PageCrudController extends CrudController
$this->crud->setModel('App\Models\Page');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/page');
$this->crud->setEntityNameStrings('page', 'pages');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class PageadCrudController extends CrudController
$this->crud->setModel('App\Models\Pagead');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/pagead');
$this->crud->setEntityNameStrings('pagead', 'pageads');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class ProgrammeCrudController extends CrudController
$this->crud->setModel('App\Models\Programme');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/programme');
$this->crud->setEntityNameStrings('programme', 'programmes');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class PropertyTypeCrudController extends CrudController
$this->crud->setModel('App\Models\PropertyType');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/properties');
$this->crud->setEntityNameStrings('Eýeçiligiň görnüşi', 'Eýeçiligiň görnüşleri');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -28,6 +28,7 @@ class ShowBukjaOrdersCrudController extends CrudController
$this->crud->setModel('App\Models\ShowBukjaOrders');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/showbukjaorders');
$this->crud->setEntityNameStrings('Bukja zakaz', 'Bukja Zakazlar');
$this->crud->orderBy('updated_at', 'DESC');
if (!$this->request->has('order')) {
$this->crud->orderBy('id', 'DESC');

View File

@ -26,6 +26,7 @@ class ShowCrudController extends CrudController
$this->crud->setModel('App\Models\Show');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/show');
$this->crud->setEntityNameStrings('show', 'shows');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class SliderCrudController extends CrudController
$this->crud->setModel('App\Models\Slider');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/slider');
$this->crud->setEntityNameStrings('slider', 'sliders');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class SubscriptionCrudController extends CrudController
$this->crud->setModel('App\Models\Subscription');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/subscription');
$this->crud->setEntityNameStrings('subscription', 'subscriptions');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class TopheaderadvCrudController extends CrudController
$this->crud->setModel('App\Models\Topheaderadv');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/topheaderadv');
$this->crud->setEntityNameStrings('topheaderadv', 'topheaderadvs');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@ class User_subCrudController extends CrudController
$this->crud->setModel('App\Models\User_sub');
$this->crud->setRoute(config('backpack.base.route_prefix') . '/user_sub');
$this->crud->setEntityNameStrings('user_sub', 'user_subs');
$this->crud->orderBy('updated_at', 'DESC');
/*
|--------------------------------------------------------------------------

View File

@ -16,6 +16,7 @@ class UserCrudController extends CrudController
| BASIC CRUD INFORMATION
|--------------------------------------------------------------------------
*/
$this->crud->orderBy('updated_at', 'DESC');
$this->crud->setModel(config('backpack.permissionmanager.models.user'));
$this->crud->setEntityNameStrings(trans('backpack::permissionmanager.user'), trans('backpack::permissionmanager.users'));
$this->crud->setRoute(backpack_url('user'));