app/Http/Controllers/CategoriaRecetasController.php
/**
   * Store a newly created resource in storage.
   *
   * @param  \Illuminate\Http\Request  $request
   * @return \Illuminate\Http\Response
   */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
  {
    $categorias_receta = new Categoria($request->all());
    if ($categorias_receta->save()) {
      return response()->json($this->messages['create.success'], Response::HTTP_OK);
    }
    return response()->json($this->messages['create.fail'], Response::HTTP_CONFLICT);
  }
public function store ( Request $ request ) { $ categorias_receta = new Categoria ( $ request -> all ( ) ) ; if ( $ categorias_receta -> save ( ) ) { return response ( ) -> json ( $ this -> messages [ 'create.success' ] , Response :: HTTP_OK ) ; } return response ( ) -> json ( $ this -> messages [ 'create.fail' ] , Response :: HTTP_CONFLICT ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .