|
@@ -3,6 +3,7 @@
|
|
|
namespace Dcat\Admin\Grid\Concerns;
|
|
|
|
|
|
use Dcat\Admin\Grid\Tools;
|
|
|
+use Dcat\Admin\Support\Helper;
|
|
|
|
|
|
trait HasPaginator
|
|
|
{
|
|
@@ -30,11 +31,6 @@ trait HasPaginator
|
|
|
*/
|
|
|
protected $paginatorClass = Tools\Paginator::class;
|
|
|
|
|
|
- /**
|
|
|
- * @var \Closure
|
|
|
- */
|
|
|
- protected $paginationCallback;
|
|
|
-
|
|
|
/**
|
|
|
* Paginate the grid.
|
|
|
*
|
|
@@ -69,18 +65,6 @@ trait HasPaginator
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @param \Closure
|
|
|
- *
|
|
|
- * @return $this
|
|
|
- */
|
|
|
- public function pagination(\Closure $callback)
|
|
|
- {
|
|
|
- $this->paginationCallback = $callback;
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Get the grid paginator.
|
|
|
*
|
|
@@ -160,10 +144,6 @@ trait HasPaginator
|
|
|
*/
|
|
|
public function renderPagination()
|
|
|
{
|
|
|
- if ($callback = $this->paginationCallback) {
|
|
|
- return $callback($this);
|
|
|
- }
|
|
|
-
|
|
|
return view('admin::grid.table-pagination', ['grid' => $this]);
|
|
|
}
|
|
|
}
|