app/Http/Controllers/Api/V1/NotesController.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()
    {
        return response()->json(NotesResource::collection(Notes::orderBy('created_at','DESC'))->additional(['meta' => [
            'code'      =>200,
            'status'    =>'success',
            'message'   => 'get notes data successfully'   
        ]]));
    }
public function index ( ) { return response ( ) -> json ( NotesResource :: collection ( Notes :: orderBy ( 'created_at' , 'DESC' ) ) -> additional ( [ 'meta' => [ 'code' => 200 , 'status' => 'success' , 'message' => 'get notes data successfully' ] ] ) ) ; }
Display a listing of the resource.
Display a listing of the resource .