From 212372ae26e826eaadfc27fe31b0c2d46fbf379c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 10 May 2023 12:08:25 +0300 Subject: [PATCH] typo --- app/Models/Auth/Role.php | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/app/Models/Auth/Role.php b/app/Models/Auth/Role.php index 5e5aebada..72ab05537 100644 --- a/app/Models/Auth/Role.php +++ b/app/Models/Auth/Role.php @@ -29,6 +29,35 @@ class Role extends LaratrustRole */ public $cloneable_relations = ['permissions']; + /** + * Scope to get all rows filtered, sorted and paginated. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param $sort + * + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeCollect($query, $sort = 'display_name') + { + $request = request(); + + $search = $request->get('search'); + $limit = (int) $request->get('limit', setting('default.list_limit', '25')); + + return $query->usingSearchString($search)->sortable($sort)->paginate($limit); + } + + /** + * @inheritDoc + * + * @param Document $src + * @param boolean $child + */ + public function onCloning($src, $child = null) + { + $this->name = $src->name . '-' . Role::max('id') + 1; + } + /** * Get the line actions. * @@ -71,33 +100,4 @@ class Role extends LaratrustRole return $actions; } - - /** - * Scope to get all rows filtered, sorted and paginated. - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @param $sort - * - * @return \Illuminate\Database\Eloquent\Builder - */ - public function scopeCollect($query, $sort = 'display_name') - { - $request = request(); - - $search = $request->get('search'); - $limit = (int) $request->get('limit', setting('default.list_limit', '25')); - - return $query->usingSearchString($search)->sortable($sort)->paginate($limit); - } - - /** - * @inheritDoc - * - * @param Document $src - * @param boolean $child - */ - public function onCloning($src, $child = null) - { - $this->name = $src->name . '-' . Role::max('id') + 1; - } }