app/Http/Resources/UsersResource.php
/**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
     */
Transform the resource into an array.
Transform the resource into an array .
public function toArray($request)
    {
        return [
        'id' => $this->id,
        'nombre' => $this -> nombre,
        'primer_apellido' => $this -> primer_apellido,
        'segundo_apellido' => $this -> segundo_apellido,
        'sexo' => $this -> sexo,
        'email' => $this -> email,
        'perfil' => $this -> perfil,
        'password'  => $this -> password,
        'estatus'  => $this -> estatus
        ];
    }
public function toArray ( $ request ) { return [ 'id' => $ this -> id , 'nombre' => $ this -> nombre , 'primer_apellido' => $ this -> primer_apellido , 'segundo_apellido' => $ this -> segundo_apellido , 'sexo' => $ this -> sexo , 'email' => $ this -> email , 'perfil' => $ this -> perfil , 'password' => $ this -> password , 'estatus' => $ this -> estatus ] ; }
Transform the resource into an array.
Transform the resource into an array .