Jump to content
Fórum Script Brasil
  • 0

Listar Usuários php


Question

Como colocaria a função para mostrar os usuarios indicados?

usei o metodo 'Pluck' para chamar os usuarios da db mas ele mostra sinais do tipo '[" .,"] ficando entre os nomes e não to sabendo remover.

Eu tentei usar o 'Value' e assim fica correto, porém só mostra apenas 'um' usuario.

Como mostraria todos?

esta é a imagem do tooltip com 'pluck'

sucess.png.96c53d9933718e53c01a78c663bc6c4c.png

 

e com o 'value' mostra somente 'um' usuário

835905377_indiretos2.thumb.png.19a7eb85ea58d97b59c750a992b462a6.png

 

meu php

public function nnIndicados() {
        
                  
              
        return User::where('pai_id', $this->id)->value('name');
 


    }

 

 

meu html

<tbody>
                        @inject('usuarios', 'App\User')
                        @foreach($usuarios->getIndicados() as $user)
                        <tr>                                                                                                                         
                            <td><center><div class="font-size-sm text-muted">Resultado <span style="color:#00FF00"><strong>{{$user->totalIndicadosAtivos()}}</strong></span>/{{$user->nIndicados()}}</div>
                                <img class="img-avatar img-avatar-thumb" src="/img/positivo.png" width="128" data-container="body" alt="User Avatar" title="{{$user->nnIndicados()}}"data-toggle="tooltip" style="cursor:pointer;"></td></center>
                            <td><img class="img-avatar img-avatar-thumb" src="{{$user->photo}}"width="128" data-container="body" alt="User Avatar" data-html='true'  title="{{$user->getshortname()}}"  data-toggle="tooltip" style="cursor:pointer;"></td>
                            <td><b>{{$user->name}}</b></td>
                            <td>{{$user->email}}</td>
                            <td>{{$user->telefone}}</td>
                           <!-- <td>{{$user->getUserDirection()}}</td> -->
                            <td>{{$user->getStatus()}}</td>
                            <td>{{$user->getPacote()->nome}}</td>
                            <td>{{$user->minhaGraduacao()}}</td>
                        </tr>
                        @endforeach

 

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Cloud Computing


  • Forum Statistics

    • Total Topics
      148722
    • Total Posts
      644517
×
×
  • Create New...