app/Http/Controllers/Api/CursosController.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()
  {
    $cursos = Curso::get();
    return response()->json(['cursos' => $cursos]);
  }
public function index ( ) { $ cursos = Curso :: get ( ) ; return response ( ) -> json ( [ 'cursos' => $ cursos ] ) ; }
Display a listing of the resource.
Display a listing of the resource .