app/Http/ApiControllers/TopicController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Request $request)
    {
        $this->offset = isset($request->offset)? $request->offset : 0;
        $this->limit  = isset($request->limit)? $request->limit : 30;
        $topic  = TopicResource::collection($this->topicInterface->getAll($this->offset, $this->limit));
        $total = $this->topicInterface->total();
        $this->data($topic);
        $this->total($total);
        return $this->response('200');
    }
public function index ( Request $ request ) { $ this -> offset = isset ( $ request -> offset ) ? $ request -> offset : 0 ; $ this -> limit = isset ( $ request -> limit ) ? $ request -> limit : 30 ; $ topic = TopicResource :: collection ( $ this -> topicInterface -> getAll ( $ this -> offset , $ this -> limit ) ) ; $ total = $ this -> topicInterface -> total ( ) ; $ this -> data ( $ topic ) ; $ this -> total ( $ total ) ; return $ this -> response ( '200' ) ; }
Display a listing of the resource.
Display a listing of the resource .