daniel21gt

daniel21gt

Member Since 2 Months Ago

Experience Points 2,080
Experience
Level
Lessons Completed 0
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

27 Nov
2 weeks ago

daniel21gt left a reply on Foreign Value Problem In Seeder

thanks realrandyallen

daniel21gt left a reply on Foreign Value Problem In Seeder

Where do I read the rules of publication of Laracast?

daniel21gt started a new conversation Foreign Value Problem In Seeder

how can I add a value of a field that has a foreign value?

https://paste.laravel.io/7c10be33-d67f-49ba-8b91-088c7f540bd5

in my case the field with foreign value is

$user->tipos_usuarios_id = '1';

daniel21gt left a reply on Problem -> Roles () -> Attach In Laravel 5.5

Yes @realrandyallen, thank you very much, now it works.

daniel21gt started a new conversation Problem -> Roles () -> Attach In Laravel 5.5

The last line of code is not executed

$user->roles()->attach(Role::where('name', 'user')->first()); return $user;

https://paste.laravel.io/ea20d207-ef15-49d8-8db8-98f3786ea939

I should add the assigned role to a table but it does not, now if I do this same thing in seeder if it works, like this, why?

https://paste.laravel.io/6ae2a66a-4bd1-4a41-b496-63c7f6a41cf7

25 Nov
2 weeks ago

daniel21gt left a reply on Problems With Validator

I continue with the same error

daniel21gt started a new conversation Problems With Validator

What is this error?

"Method [validator] does not exist on [App\Http\Controllers\Auth\RegisterController]."

The error appears in this view

https://paste.laravel.io/00663477-63b2-45c2-a2d2-3c557b109209

daniel21gt left a reply on Class App\Http\Controllers\AuthController Does Not Exist

What is this error?

"Method [validator] does not exist on [App\Http\Controllers\Auth\RegisterController]."

The error appears in this view

https://paste.laravel.io/00663477-63b2-45c2-a2d2-3c557b109209

15 Nov
4 weeks ago

daniel21gt left a reply on Problems Paged By Ranges

I decided to do it in another way

{{ $usuarios->appends(array('valoruno'=>$valoruno, 'valordos'=>$valordos))->links() }}

These are the two URLs, but no records appear on the second page.

http://crudgobernaciontres.test/panel/fecha?from=2018-11-01&to=2018-11-16

http://crudgobernaciontres.test/panel/fecha?valoruno=2018-11-01&valordos=2018-11-16&page=2

daniel21gt left a reply on Problems Paged By Ranges

Yesterday I had tried it the way you say, but even on the second page it appears that there are no records.

public function fecha(Request $request)

{

    $valoruno=$request->from;
    $valordos=$request->to;
    $usuarios=usuarios::whereBetween('created_at', [$valoruno, $valordos])->paginate(10);
    $usuariosOpciones=usuarios::pluck('usuario_ad', 'user_id')->unique();
    return  view('usuario.fecha',compact('usuarios','usuariosOpciones','valoruno','valordos'));

}

And also sending the variables to the links

{{ $usuarios->appends(array('valoruno'=>$valoruno, 'valordos'=>'valordos'))->links() }}

The same only loads the first page, I do not understand why, it should work.

daniel21gt left a reply on Problems Paged By Ranges

For what reason 'valordos' => 'valordos' is not 'valordos' => '$valordos'

14 Nov
4 weeks ago

daniel21gt started a new conversation Problems Paged By Ranges

I have tried to paginate by date range, so I am sending the two parameters by means of an appends (array ()), managing to load the first page but not the second, in this way.

public function fecha(Request $request) { $valoruno=$request->from; $valordos=$request->to; $usuarios=usuarios::whereBetween('created_at', [$valoruno, $valordos])->paginate(10); $usuarios->appends(array('valoruno'=>$valoruno, 'valordos'=>'valordos')); $usuariosOpciones=usuarios::pluck('usuario_ad', 'user_id')->unique(); return view('usuario.index',compact('usuarios','usuariosOpciones')); }

In my view, the links would be received

{{ $usuarios->links() }}

will something be missing?

13 Nov
1 month ago

daniel21gt left a reply on Paginate () Method With Errors

I'm sorry, I had seen the documentation but I did not understand, my native language is Latin, your suggestions are true, but in the end Snapey gave me a solution in this way.

   $valorusuario = (int)$request->valorusuario;
    $consultarea=usuarios::where('user_id', $valorusuario)->paginate(6);
    $consultarea->appends(['valorusuario'=>$valorusuario]);
    $usuariosOpciones=usuarios::pluck('usuario_ad', 'user_id')->unique();
    return view('usuario.consultareas',compact('consultarea','usuariosOpciones'));

Thank you very much for your attention.

daniel21gt left a reply on Problem Paging Method

Haa what was the method appends (), try in many ways, did not know the method, now I understand, you are very kind Snapey, thanks for your help.

daniel21gt left a reply on Paginate () Method With Errors

$users->appends(request()->input())->links();

$users->appends(request()->input())->links();

Because if it is, I currently have it

https://paste.laravel.io/937dd107-ff79-45d9-89ee-5070654ae5db

12 Nov
1 month ago

daniel21gt started a new conversation Paginate () Method With Errors

I have detected that laravel when sent a numerical page parameter works perfect, for example.

$users = User::where('votes', '>', 100)->paginate(15);

but if you are in via a parameter by means of a request

$numero = $request->numero; $users = User::where('votes', '>', $numero)->paginate(15);

dd ($ number) would be 100, but in this way it only loads the first page and the following ones do not, maybe the paginate () method can not manage past values with request?

daniel21gt started a new conversation Problem Paging Method

I have a problem, if I use the variable $ numero in the paging it works perfect, but if I use the variable $ int the paged one loads in the first page but does not load the following ones, because this happens

/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function selectord(Request $request) {

    $valorusuario = $request->valorusuario;
    $int = (int)$valorusuario;

    $numero = 1;
   
 
    $consultarea=usuarios::where('user_id', $numero)->paginate(2);
    $usuariosOpciones=usuarios::pluck('usuario_ad', 'user_id')->unique();
    return view('usuario.consultareas',compact('consultarea','usuariosOpciones'));
  
}

daniel21gt started a new conversation Control Structures

it is possible to use a for or a while in laravel5.5?

11 Nov
1 month ago

daniel21gt left a reply on Problemas Con Paginate()

Sorry, you're right, I corrected the correct view.

daniel21gt started a new conversation Problemas Con Paginate()

How are you

I have a page problems, in a method called function review the paging works perfect, but in another method called selectord it does not work, since this apparently loads the first paged, but when I go to the second one, there are no records when they should be. I have consulted the documentation of laravel and the syntax is apparently correct, I do not know what can be wrong.

my controller https://paste.laravel.io/5e0ba166-6f1b-4736-b1f0-b7cbfaee9e4f my view https://paste.laravel.io/8e1ef28f-a913-4489-ad18-5441bb7c2c8a my routes https://paste.laravel.io/6b353c03-0f3d-4fe1-8de8-8104ebac810e

08 Nov
1 month ago

daniel21gt left a reply on Problems With Datepicker

Snapey, you have taken me out of a mess, now I understand my mistake, as you say it works, I thank you very much, also thanks to those who tried to help me.

07 Nov
1 month ago

daniel21gt left a reply on Problems With Datepicker

Yes Snapey, I'm looking at how to fix it, based on the suggestions

06 Nov
1 month ago

daniel21gt left a reply on Problems With Datepicker

I'm studying your suggestions, it's funny, create a new project just to test this code, and it works perfect, but everything is damaged when I use the layout with the view.

$( function() { $( "#datepicker" ).datepicker({ changeMonth: true, changeYear: true }); } );

Date:

daniel21gt started a new conversation Problems With Datepicker

How are you

I have tried to configure a calendar, for now without a controller, only in the view, even though I have configured everything, when I click on the input the calendar does not appear

This is my layout

<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

          

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
                <!-- Branding Image -->
                <a class="navbar-brand" href="{{ url('/') }}">
                    {{ config('app.name', 'app') }}
                </a>
            </div>
           
            <div class="collapse navbar-collapse" id="app-navbar-collapse">
                <!-- Left Side Of Navbar -->
                <ul class="nav navbar-nav">
                    &nbsp; 
                </ul> 

                <!-- Right Side Of Navbar -->
                <ul class="nav navbar-nav navbar-right">
                    <!-- Authentication Links -->
                    @guest
                        <li><a href="{{ route('login') }}">Login</a></li>
                    @else
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" v-pre>
                                {{ Auth::user()->name}} {{ Auth::user()->last_name}} <span class="caret"></span>
                            </a>
                          
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="{{ route('logout') }}"
                                        onclick="event.preventDefault();
                                                 document.getElementById('logout-form').submit();">
                                        Salir
                                    </a>

                                    <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                                        {{ csrf_field() }}
                                    </form>
                                </li>
                            </ul>
                        </li>
                    @endguest
                </ul>
            </div>
        </div>
    </nav>
    @yield('content')
</div>


<script src="{{ asset('js/app.js') }}"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

This is my view

@extends('layouts.layout') @section('content')

@if(Session::has('success')) {{Session::get('success')}} @endif

Usuarios votantes

        <div class="btn-group">
          <div class="col-md-2">
            <form action="{{route('usuario.fecha')}}" method="post">
                    <p><input type="text" id="datepicker"></p>
                    <button type="submit" class="btn btn-danger btn-xs">Enviar</button>
            </form>
          </div>  
        </div>

             
      <div class="btn-group">
            <div class="col-md-10">

            <form action="{{route('usuario.selector')}}" method="get">
                {{csrf_field()}}
                   <select name="tipo" id="tipo" class=" form-control"  value="{{ old('tipo') }}"  required>
                    @foreach($usuariosOpciones as $user_id => $usuario_ad)
                      <option value="{{ $user_id }}">{{ $usuario_ad }}</option>
                   @endforeach
               </select>
            <button class="btn btn-danger btn-xs" type="submit">enviar</button>
         </form>
               
             </div>  
          </div>


       <div class="btn-group">
            <div class="col-md-10">

            <form action="{{route('usuario.cedula')}}" method="get">
                {{csrf_field()}}
                <input type="number" name="cc" id="cc" min="1111111" max="9999999999" class="form-control input-sm" value="{{ old('cedula') }}" placeholder="cedula">
                <button class="btn btn-danger btn-xs" type="submit">enviar</button>
            </form>
               
             </div>  
          </div>


        </div>
       
      </div>
      <div class="table-container">
        <table id="mytable" class="table table-bordred table-striped table-bordered">
         <thead>
           <th>Usuario_ad</th>
           <th>Nombre</th>
           <th>Apellido</th>
           <th>Cedula</th>
           <th>Telefonos</th>
           <th>Direccion</th>
           <th>barrio</th>
           <th>Lugar_v</th>
           <th>Mesa_v</th>
           <th>Email</th>
           <th>Ciudad</th>
           <th>Editar</th>
           <th>Eliminar</th>
         </thead>
         <tbody>
          @if($usuarios->count()) 
          @foreach($usuarios as $usuario)  
          <tr>
            <td>{{$usuario->usuario_ad}}</td>
            <td>{{$usuario->nombre}}</td>
            <td>{{$usuario->apellido}}</td>
            <td>{{$usuario->cedula}}</td>
            <td>{{$usuario->telefonos}}</td>
            <td>{{$usuario->direccion}}</td>
            <td>{{$usuario->barrio}}</td>
            <td>{{$usuario->lugar_votacion}}</td>
            <td>{{$usuario->mesa_votacion}}</td>
            <td>{{$usuario->email}}</td>
            <td>{{$usuario->ciudad}}</td>
            <td><a class="btn btn-primary btn-xs" href="{{action('[email protected]', $usuario->id)}}" ><span class="glyphicon glyphicon-pencil"></span></a></td>
            <td>
              <form action="{{action('[email protected]', $usuario->id)}}" method="post">
               {{csrf_field()}}
               <input name="_method" type="hidden" value="DELETE">
               <button class="btn btn-danger btn-xs" type="submit"><span class="glyphicon glyphicon-trash"></span></button>
               </form>
            </td>
           </tr>
           @endforeach 
           @else
           <tr>
            <td colspan="8">No hay registro !!</td>
          </tr>
          @endif
        </tbody>
      </table>
    </div>
  </div>
  {{ $usuarios->links() }}
</div>

@endsection @section('scripts') $( function() { $( "#datepicker" ).datepicker({ changeMonth: true, changeYear: true }); }); @endsection

What will I be doing wrong?

05 Nov
1 month ago

daniel21gt started a new conversation Version Jquery

How does anyone know how I can find out what version of jquery I have installed?

30 Oct
1 month ago

daniel21gt left a reply on Route Problem

Cronix ... I finally managed to fix it, I just sent in GET from the form, as well as the routes.

            <form action="{{route('usuario.selector')}}" method="get">
                {{csrf_field()}}
                   <select name="tipo" id="tipo" class=" form-control"  value="{{ old('tipo') }}"  required>
                    @foreach($usuariosOpciones as $user_id => $usuario_ad)
                      <option value="{{ $user_id }}">{{ $usuario_ad }}</option>
                   @endforeach
               </select>
            <button class="btn btn-danger btn-xs" type="submit">enviar</button>
         </form>
               
             </div>  
          </div>


       <div class="btn-group">
            <div class="col-md-10">

            <form action="{{route('usuario.cedula')}}" method="get">
                {{csrf_field()}}
                <input type="number" name="cc" id="cc" min="1111111" max="9999999999" class="form-control input-sm" value="{{ old('cedula') }}" placeholder="cedula">
                <button class="btn btn-danger btn-xs" type="submit">enviar</button>
            </form>
               
             </div>  
          </div>

Route::get('/panel/selector', '[email protected]')->name('usuario.selector'); Route::get('/panel/cedula', '[email protected]')->name('usuario.cedula');

29 Oct
1 month ago

daniel21gt left a reply on Route Problem

It is supposed that the obtaining path is this, but I have not managed to make it redirect, it is what I have tried to do, because I know that this way the error would not appear.

Route::get('/panel/listado', '[email protected]')->name('usuario.listado');

daniel21gt left a reply on Route Problem

@extends('layouts.layout') @section('content')

@if(Session::has('success')) {{Session::get('success')}} @endif

Usuarios votantes

      <div class="btn-group">
            <div class="col-md-10">

            <form action="{{route('usuario.selector')}}" method="post">
                {{csrf_field()}}
                   <select name="tipo" id="tipo" class=" form-control"  value="{{ old('tipo') }}"  required>
                    @foreach($usuariosOpciones as $user_id => $usuario_ad)
                      <option value="{{ $user_id }}">{{ $usuario_ad }}</option>
                   @endforeach
               </select>
            <button class="btn btn-danger btn-xs" type="submit">enviar</button>
         </form>
               
             </div>  
          </div>


       <div class="btn-group">
            <div class="col-md-10">

            <form action="{{route('usuario.cedula')}}" method="post">
                {{csrf_field()}}
                <input type="number" name="cc" id="cc" min="1111111" max="9999999999" class="form-control input-sm" value="{{ old('cedula') }}" placeholder="cedula">
                <button class="btn btn-danger btn-xs" type="submit">enviar</button>
            </form>
               
             </div>  
          </div>


        </div>
       
      </div>
      <div class="table-container">
        <table id="mytable" class="table table-bordred table-striped table-bordered">
         <thead>
           <th>Usuario_ad</th>
           <th>Nombre</th>
           <th>Apellido</th>
           <th>Cedula</th>
           <th>Telefonos</th>
           <th>Direccion</th>
           <th>barrio</th>
           <th>Lugar_v</th>
           <th>Mesa_v</th>
           <th>Email</th>
           <th>Ciudad</th>
           <th>Editar</th>
           <th>Eliminar</th>
         </thead>
         <tbody>
          @if($usuarios->count()) 
          @foreach($usuarios as $usuario)  
          <tr>
            <td>{{$usuario->usuario_ad}}</td>
            <td>{{$usuario->nombre}}</td>
            <td>{{$usuario->apellido}}</td>
            <td>{{$usuario->cedula}}</td>
            <td>{{$usuario->telefonos}}</td>
            <td>{{$usuario->direccion}}</td>
            <td>{{$usuario->barrio}}</td>
            <td>{{$usuario->lugar_votacion}}</td>
            <td>{{$usuario->mesa_votacion}}</td>
            <td>{{$usuario->email}}</td>
            <td>{{$usuario->ciudad}}</td>
            <td><a class="btn btn-primary btn-xs" href="{{action('[email protected]', $usuario->id)}}" ><span class="glyphicon glyphicon-pencil"></span></a></td>
            <td>
              <form action="{{action('[email protected]', $usuario->id)}}" method="post">
               {{csrf_field()}}
               <input name="_method" type="hidden" value="DELETE">
               <button class="btn btn-danger btn-xs" type="submit"><span class="glyphicon glyphicon-trash"></span></button>
               </form>
            </td>
           </tr>
           @endforeach 
           @else
           <tr>
            <td colspan="8">No hay registro !!</td>
          </tr>
          @endif
        </tbody>
      </table>
    </div>
  </div>
  {{ $usuarios->links() }}
</div>
HOME

@endsection

daniel21gt left a reply on Route Problem

f I click on the browser update button loads well, but if I just enter to update there is where the error appears.

This is the previous driver where you try to call the function listado to the selector method, looking to change the route, but still be in panel / selector

controller https://paste.laravel.io/2d31f04f-9695-426e-9a8d-2dd1bd06efcf

view https://paste.laravel.io/c9daeee8-3e70-42a9-8a64-3e762ac654f3

routes https://paste.laravel.io/49f70e97-4f6d-48b7-9a65-6b68e26a0189

I guess to fix the problem the route / panel / selector, I should change to / panel / listing, so I would not pass that error, but I have not managed to make that happen.

daniel21gt started a new conversation Route Problem

I have the following form, which loads well

https://ibb.co/dmptCf

Then I search for the filter the users that agree with danielad, and it works well, loading another route.

https://ibb.co/f4PAsf

Then if I update or reload the current page, I get this error

https://ibb.co/np6ZJL

My rutoues https://paste.laravel.io/484e34eb-9b17-4180-8cb2-7a299d443675

My controller https://paste.laravel.io/039f56c7-b894-4557-95bf-1d64f53ee5b4

The methods in which I work are, selector, cedula, index.

I tried to redirect to a listado GET route, but it did not work, so I deleted that method and left it as it was, but I do not know what else to do to avoid this error?

27 Oct
1 month ago

daniel21gt left a reply on Problem When Reloading Page

This deal, for example I am using this line, which redirects me, but is not sending the variables $usuarios and $usuariosOpciones.

return redirect()->route('usuario.listado')->with(compact($usuarios, $usuariosOpciones));

before http://crudgobernaciontres.test/panel/usuario after http://crudgobernaciontres.test/panel/listado

but it loads exactly the same, not what my variables have, these are the methods.

https://paste.laravel.io/6c498ee1-23ff-4d9b-a1e3-0059336cb167

daniel21gt left a reply on Problem When Reloading Page

Is this rule valid?

return redirect()->route('usuario.listado',compact('usuarios','usuariosOpciones'));

25 Oct
1 month ago

daniel21gt left a reply on Problem When Reloading Page

If I configure GET, the data no longer loads, that's why I have them post, because I am sending them from these two forms.

view cedula https://paste.laravel.io/6166efbf-ea77-4331-a514-68bdc1ecd279 view selector https://paste.laravel.io/bee7a977-89f2-4b59-8fa3-62e3fd8ad3aa

If I send a POST towards a GET method the error that I have would be valid, but I am sending in my view with POST and I receive the data properly, I do not know what I have wrong

24 Oct
1 month ago

daniel21gt started a new conversation Problem When Reloading Page

How are you

I have two routes that load well, which are

Route::post('/panel/cc', '[email protected]')->name('usuario.cedula'); Route::post('/panel/show', '[email protected]')->name('usuario.selector');

routes https://paste.laravel.io/db4e95ed-e051-4eda-afe7-e5de10609fe1#20

But when giving an enter, to refresh that same page, it no longer loads, and this error appears.

https://paste.laravel.io/7062171e-0a6e-47d4-a89f-114c56acd429

22 Oct
1 month ago

daniel21gt left a reply on Problem Query Eloquent

Thank you bobbybouwmann, what I really want is that in the asignacion field, appear three times gestion, since there are three times danielad.

https://ibb.co/i74TBV

21 Oct
1 month ago

daniel21gt started a new conversation Problem Query Eloquent

How are you

I want to update a field called asignacion, as long as they agree with the usuario_ad, but I only manage to update the first one and not all the records.

This is what I want

update usuarios set asignacion='gestion' where usuario_ad='danielad';

But I've only managed to erase the first record

https://paste.laravel.io/57f48469-28ad-41fe-af79-11b9e2023618

How can i fix this?

20 Oct
1 month ago

daniel21gt left a reply on Translation To Eloquen

Thanks snapey.

daniel21gt started a new conversation Translation To Eloquen

How are you

I have tried to pass this query in eloquen, but I have not managed to do it well, I have errors, does anyone know how I can translate this query?

update usuarios set asignacion='gestion' where id='8';

15 Oct
1 month ago

daniel21gt left a reply on Problems With Data Query

Thanks cronix.

daniel21gt left a reply on Problems With Data Query

I have studied all your suggestions and I finally understood all my mistakes..

https://paste.laravel.io/2d92889b-39ab-4a39-bc57-980440516c5d

I was comparing the wrong field

And I was not calling the id = 'type' of the form, now the query filter works.

now the only thing I need is to adjust the method paginate ()

$usuarioshow=usuarios::where("user_id","=",$request->tipo)->paginate(10)->get();

Tengo este error

"Type error: Too few arguments to function Illuminate\Support\Collection::get(), 0 passed in C:\laragon\www\crudgobernaciontres\vendor\laravel\framework\src\Illuminate\Pagination\AbstractPaginator.php on line 577 and at least 1 expected ◀

13 Oct
2 months ago

daniel21gt left a reply on Problems With Data Query

I want to consult all the users_ad unique in the database

My intension is

From the form send what I have in usuario_ad to this method in the controller

https://paste.laravel.io/c0e21cd2-f37d-43ff-aeaa-3f2a6d60c82a

the route for the show en route: list method is

GET|HEAD | panel/usuario/{usuario} | usuario.show | App\Http\Controllers\[email protected]

daniel21gt left a reply on Problems With Data Query

It is correct cronix, now the view shows me all the records, but I also want to consult by usuario_ad, in the same view, is it possible to apply this filter in this same view?

https://ibb.co/iT83B9

daniel21gt left a reply on Problems With Data Query

If there is cronix .. look $usuariosOpciones is in the index method,

Look at the entire files,

view complet: https://paste.laravel.io/ed0d4013-d4e0-4a4e-b342-0915ff953bc5

controller complet: https://paste.laravel.io/ae53372b-efca-4a7d-9a18-d15edb69dc3d

daniel21gt started a new conversation Problems With Data Query

I want to check the records of any user that I select

view https://paste.laravel.io/bda1121e-ef9b-4a31-a6b0-4e675ad74424

And send the parameter to my controller

Controller https://paste.laravel.io/a6230ec2-1869-42cb-a822-42753dd518d5

But I get this error in the view "Undefined variable: usuario_ad (View: C:\laragon\www\crudgobernaciontres\resources\views\Usuario\index.blade.php)"

How I can avoid this?

daniel21gt left a reply on Doubt With Methods --resource

As always cronix, successful, thanks

daniel21gt left a reply on Doubt With Methods --resource

Where is it changed?