public function getAll($lang = "")
    {
        $classNameArr = explode("\\", get_class($this));
        $className = "App\\Models\\".str_replace("Controller", "", $classNameArr[4]);
        $rowsPerPage = $className::$rowsPerPage;
        $class = new $className();

        $obj = DB::table($class->table);
        if(isset($_GET['order']) && isset($_GET['type'])) {
            $obj = $obj->orderBy($_GET['order'], $_GET['type']);
        }
        return $obj->simplePaginate($rowsPerPage);
    }
public function getAll($lang = "")
    {
        $classNameArr = explode("\\", get_class($this));
        $className = "App\\Models\\".str_replace("Controller", "", $classNameArr[4]);
        $rowsPerPage = $className::$rowsPerPage;
        $class = new $className();

        $obj = DB::table($class->table);
        if(isset($_GET['order']) && isset($_GET['type'])) {
            $obj = $obj->orderBy($_GET['order'], $_GET['type']);
        }
        return $obj->simplePaginate($rowsPerPage);
    }
public function getAll ( $ lang = "" ) { $ classNameArr = explode ( "\\" , get_class ( $ this ) ) ; $ className = "App\\Models\\" . str_replace ( "Controller" , "" , $ classNameArr [ 4 ] ) ; $ rowsPerPage = $ className :: $ rowsPerPage ; $ class = new $ className ( ) ; $ obj = DB :: table ( $ class -> table ) ; if ( isset ( $ _GET [ 'order' ] ) && isset ( $ _GET [ 'type' ] ) ) { $ obj = $ obj -> orderBy ( $ _GET [ 'order' ] , $ _GET [ 'type' ] ) ; } return $ obj -> simplePaginate ( $ rowsPerPage ) ; }
Returns the list of specific model.

@param  string $lang
@return \Illuminate\Contracts\Pagination\Paginator
Returns the list of specific model .