Mostrar mensajes
Comprar curso

8. Mostrar mensajes


1 comentarios

Inicia sesión para comentar

Comentarios:

  • Gerald Flores Pomari

    Gerald Flores Pomari hace 3 semanas

    Hola Victor,  tengo el siguiente error en la validación 
    Illuminate\Validation\Factory::make(): Argument #3 ($messages) must be of type array, null given, called in C:\xampp\htdocs\laravel\webSockets\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 361
    Mi codigo de la validación 
    public  function save(){
            $this->validate([
                'content' => 'required|min:3',
            ]);  
    
            Message::create([
                'content' => $this->content,
                'user_id' => auth()->id()
            ]);
    
            //limpiar contenido
            $this->content = '';
            $this->getMessages();
        }