I already have created one Reorder Operation where my custom query works, only bestsellers products are visible and they get reorder. It is working Fine, my problem is can we keep multiple reorder on same page?
This is how I am managing reorder operation on Laravel Backpack 3.
use \Backpack\CRUD\app\Http\Controllers\Operations\ReorderOperation;
public function setupReorderOperation()
{
// define which model attribute will be shown on draggable elements
$this->crud->set('reorder.label', 'name');
// define how deep the admin is allowed to nest the items
// for infinite levels, set it to 0
//$this->crud->addClause('bestsellers', 1); // apply local dynamic scope
$this->crud->addClause('where', 'bestsellers', '=', '1');
$this->crud->set('reorder.max_level', \App\Models\ProjectName\Product::MAX_DEPTH);
}
Now what I have tried to create multiple Trait inside \Backpack\CRUD\app\Http\Controllers\Operations\ReorderOperation1 by overriding
but it is not working.
Inside my Trait(ReorderOperation1)
<?php
namespace App\Http\Controllers\Admin\Operations;
trait ReorderOperation1
{
use \CompanyName\Framework\app\Http\Controllers\Admin\Operations\ReorderOperation;
}
I want another Reorder Operation Button on Same page where I can reorder with other fields.
Any help will be appreciated.