public function getAllWithoutPagination($lang = "")
    {
        $classNameArr = explode("\\", get_class($this));
        $className = "App\\Models\\".str_replace("Controller", "", $classNameArr[4]);
        $class = new $className();
        return $class->all();
    }
public function getAllWithoutPagination($lang = "")
    {
        $classNameArr = explode("\\", get_class($this));
        $className = "App\\Models\\".str_replace("Controller", "", $classNameArr[4]);
        $class = new $className();
        return $class->all();
    }
public function getAllWithoutPagination ( $ lang = "" ) { $ classNameArr = explode ( "\\" , get_class ( $ this ) ) ; $ className = "App\\Models\\" . str_replace ( "Controller" , "" , $ classNameArr [ 4 ] ) ; $ class = new $ className ( ) ; return $ class -> all ( ) ; }
Used as API to get list of all rows without using pagination.
returns array of all rows in database.

Uses the Controller name to get his model.
Controller name has to start with the name as the model.

Exmp. (ModelName)Controller -- UserController.

@param  string $lang
@return mixed
Used as API to get list of all rows without using pagination . returns array of all rows in database .