src/Repositories/Repository.php
public function getPaginatedAndOrdered()
    {
        $direction = request()->get('direction');
        $orderBy = request()->get('orderby');

        $p = config('admin.paginate');

        if($orderBy)
            return $this->orderBy($orderBy, $direction)->paginate($p);
        return $this->paginate();
    }
public function getPaginatedAndOrdered()
    {
        $direction = request()->get('direction');
        $orderBy = request()->get('orderby');

        $p = config('admin.paginate');

        if($orderBy)
            return $this->orderBy($orderBy, $direction)->paginate($p);
        return $this->paginate();
    }
public function getPaginatedAndOrdered ( ) { $ direction = request ( ) -> get ( 'direction' ) ; $ orderBy = request ( ) -> get ( 'orderby' ) ; $ p = config ( 'admin.paginate' ) ; if ( $ orderBy ) return $ this -> orderBy ( $ orderBy , $ direction ) -> paginate ( $ p ) ; return $ this -> paginate ( ) ; }
get a record paginated and ordered

@return Model
get a record paginated and ordered