app/Http/Controllers/ComentarioController.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)
    {
        $comentario                       = new ComentarioModel;
        $current_timestamp                = date ('Y-m-d H:i:s');
        $comentario->comentario           = $request['comentario'];
        $comentario->clave_post           = $request['clave_post'];
        $comentario->correo               = $request['correo'];
        $comentario->correo               = $request['nombre'];
        $comentario->fecha_alta           = $current_timestamp;
        $comentario->save();
        return $comentario;
    }
public function store ( Request $ request ) { $ comentario = new ComentarioModel ; $ current_timestamp = date ( 'Y-m-d H:i:s' ) ; $ comentario -> comentario = $ request [ 'comentario' ] ; $ comentario -> clave_post = $ request [ 'clave_post' ] ; $ comentario -> correo = $ request [ 'correo' ] ; $ comentario -> correo = $ request [ 'nombre' ] ; $ comentario -> fecha_alta = $ current_timestamp ; $ comentario -> save ( ) ; return $ comentario ; }
Store a newly created resource in storage.
Store a newly created resource in storage .