MarcosKlender

MarcosKlender

Member Since 2 Years Ago

Experience Points
1,130
Total
Experience

3,870 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

Level 1
1,130 XP
May
13
2 weeks ago
Activity icon

Replied to Update Query To Show Table In Real Time

Sorry. I just updated the reply.

Activity icon

Replied to Update Query To Show Table In Real Time

I was used an example because my controller has so many lines.

For example, I have something like this.

public function index(Request $request)
{
        $date_ini = $request->get('date_ini');
        $date_fin = $request->get('date_fin');    
        $checkbox = $request->get('check');

        $extras = ['desde' => $date_ini, 'hasta' => $date_fin];

        $local = DB::connection('pgsql')->table('DATOS_CABECERA_OT')->get();

        return view('OrdenesDeTaller')->withDetails($local)->with($extras);                
   
    return view('OrdenesDeTaller');
}

I don't have any ideas. jQuery in the view maybe?

Activity icon

Replied to Update Query To Show Table In Real Time

Oh no, sorry. I need to select an option from the combo box and then, clic in a "Update Table" button. That button must be the one that changes the query to reload the table.

Activity icon

Started a new Conversation Update Query To Show Table In Real Time

Greetings!

I hope I can explain myself properly.

I have a table in my view that shows all rows in my db like this:

Query used to make this table:
$query= DB::connection('pgsql')->table('DATOS_CABECERA_OT')->get();

+-------+---------+----------------+
| form  | taller  | id_antiguedad  |
+-------+---------+----------------+
| 1     | A1      | 2020           |
| 2     | A2      | 2020           |
| 3     | A3      | 2019           |
| 4     | A1      | 2019           |
| 5     | A2      | 2019           |
| 6     | A3      | 2018           |
| 7     | B1      | 2018           |
| 8     | B2      | 2017           |
| 9     | B1      | 2017           |

Now, I need a button in my view to update the query to show specific rows using where statements, like this querys:

$query = DB::connection('pgsql')->table('DATOS_CABECERA_OT')->where('taller','A1')->get();

$query = DB::connection('pgsql')->table('DATOS_CABECERA_OT')->where('taller','B1')->where('id_antiguedad','2018')->get();

$query = DB::connection('pgsql')->table('DATOS_CABECERA_OT')->where('taller','A2')->where('id_antiguedad','2020')->get();

That button must update the rows retrieved from db and show all the new info in the same table, in real time. I also have this combo box:

<select class="form-control ml-3" id="id_antiguedad" name="id_antiguedad">
    <option value="" >ALL</option>
    <option value="2020" >2020</option>
    <option value="2019" >2019</option>
    <option value="2018" >2018</option>
    <option value="2017" >2017</option>
</select>

This combo box makes a filter to the table. I need to update the table in the view in real time. Please help!

Apr
07
1 month ago
Activity icon

Awarded Best Reply on Insert Database Rows Into A Txt File

You're awesome man! Thanks for your help!

I share with all of you the solution for this thread. It works perfectly.

public function txt()
    {
        $query = DB::connection('pgsql')->table('DATOS_CABECERA_OT')->get();

        $data = [];

        foreach ($query as $value)
        {
            $t1 = $value->ID_FORMATO; 
            $t2 = $value->ID_CONCESIONARIO;
            $t3 = $value->ID_SUCURSAL;
            $t4 = $value->OT_ID_ORDEN;
            $t5 = $value->AN_ID_ANTIGUEDAD;

            $data[] = [$t1, $t2, $t3, $t4, $t5, "\n"];
        }

        $txt = implode('', array_map(function($item){ return implode('', $item); }, $data));
        
        return response($txt)
        ->withHeaders([
            'Content-Type' => 'text/plain',
            'Cache-Control' => 'no-store, no-cache',
            'Content-Disposition' => 'attachment; filename="'.date('Y-m-d H-i-s').'.txt',
        ]);
    }
Activity icon

Replied to Insert Database Rows Into A Txt File

You're awesome man! Thanks for your help!

I share with all of you the solution for this thread. It works perfectly.

public function txt()
    {
        $query = DB::connection('pgsql')->table('DATOS_CABECERA_OT')->get();

        $data = [];

        foreach ($query as $value)
        {
            $t1 = $value->ID_FORMATO; 
            $t2 = $value->ID_CONCESIONARIO;
            $t3 = $value->ID_SUCURSAL;
            $t4 = $value->OT_ID_ORDEN;
            $t5 = $value->AN_ID_ANTIGUEDAD;

            $data[] = [$t1, $t2, $t3, $t4, $t5, "\n"];
        }

        $txt = implode('', array_map(function($item){ return implode('', $item); }, $data));
        
        return response($txt)
        ->withHeaders([
            'Content-Type' => 'text/plain',
            'Cache-Control' => 'no-store, no-cache',
            'Content-Disposition' => 'attachment; filename="'.date('Y-m-d H-i-s').'.txt',
        ]);
    }
Activity icon

Replied to Insert Database Rows Into A Txt File

Thanks! That was a good improvement. Now the text file shows the 3 rows like this:

[["F0010","G000062","1","13493","1","\n"],["F0010","G000062","1","13494","1","\n"],["F0010","G000062","1","13517","1","\n"]]

I need to show them like this:

F0010 G000062 1 13493 1
F0010 G000062 1 13494 1
F0010 G000062 1 13517 1

Can you help me with that, please?

Activity icon

Replied to Insert Database Rows Into A Txt File

If I put the return after the loop only prints the last row. The other 2 rows still missing.

Apr
06
1 month ago
Activity icon

Replied to Insert Database Rows Into A Txt File

Unfortunately, It's required to be a txt file. :(

Activity icon

Started a new Conversation Insert Database Rows Into A Txt File

Greetings!

I have multiple rows in my local database (3 rows for this example) and I want to retrieve all rows and insert into a txt file as plain text. I don't know what I'm doing wrong because only prints one row.

Here's my txt function:

public function txt()
    {
        $txt = DB::connection('pgsql')->table('DATOS_CABECERA_OT')->get();

        foreach ($txt as $value)
        {
            $t1 = $value->ID_FORMATO; 
            $t2 = $value->ID_CONCESIONARIO;
            $t3 = $value->ID_SUCURSAL;
            $t4 = $value->OT_ID_ORDEN;
            $t5 = $value->AN_ID_ANTIGUEDAD;

            $test = array($t1, ' ', $t2, ' ', $t3, ' ', $t4, ' ', $t5);
            echo "\n";

        return response(implode($test))
                ->withHeaders([
                    'Content-Type' => 'text/plain',
                    'Cache-Control' => 'no-store, no-cache',
                    'Content-Disposition' => 'attachment; filename=example.txt',
                ]);
        }
    }

And this is what I get (2 rows missing):


F0010 G000062 1 13493                1

Please help! :(

Mar
30
2 months ago
Activity icon

Replied to Send Variables From View (table) To Controller Function

How can I do that? And how can I use the same $request in the two methods?

$date1 = $request->get('datepicker1');
$date2 = $request->get('datepicker2');

I need that dates in the query. Sorry for the inconvenience, I'm new doing this. :(

Mar
29
2 months ago
Activity icon

Replied to Send Variables From View (table) To Controller Function

But I need to download all that data after they showed in the view (tables).

So, the better solution is to do the same query twice? :o

Activity icon

Replied to Send Variables From View (table) To Controller Function

I broke the app and restore a backup from Github, so I don't have any changes.

Can you give me any idea to try, please?

Mar
28
2 months ago
Activity icon

Started a new Conversation Send Variables From View (table) To Controller Function

Greetings!

I need to pass all the variables listed (td) in my table from view to the controller.

Here's a part of my view:

                         <tbody>
                            @foreach ($details as $value)
                            @php
                                $datos_persona = utf8_encode($value->persona_nombre);
                                $auxiliar = str_replace(',', ' ', $datos_persona);
                                list($primer_apellido, $segundo_apellido, $primer_nombre, $segundo_nombre) = explode(",", $datos_persona);

                                $id_formato = 'F0010';
                                $id_concesionario = 'G000062';
                            @endphp

                            <tr>
                              <td>{{ $id_formato }}</td>
                              <td>{{ $id_concesionario }}</td>
                              <td>{{ $value->codigo_sucursal }}</td>
                              <td>{{ $value->numero_orden }}</td>
                              <td>{{ $value->anio_modelo }}</td>
                              <td>{{ $value->codigo_marca }}</td>
                              <td>{{ $value->codigo_modelo }}</td>
                              <td>{{ $value->persona_ruc }}</td>
                              <td>{{ $value->persona_nombre }}</td>
                              <td>{{ $value->numero_orden }}</td>
                              <td>{{ $value->viene_de_cita }}</td>
                              <td>{{ $value->chasis }}</td>
                              <td>{{ $value->placa }}</td>
                              <td>{{ $value->kilometraje }}</td>
                              <td>{{ $value->numero_motor }}</td>
                              <td>{{ $value->anio_modelo }}</td>
                              <td>{{ $value->reparaciones_solicitadas }}</td>
                              <td>{{ $value->observacion }}</td>
                              <td>{{ $value->fecha_recepcion }}</td>
                              <td>{{ $value->fecha_ofrece }}</td>
                              <td>{{ $value->fecha_liquidacion }}</td>
                              <td>{{ $value->fecha_recepcion }}</td>
                              <td>{{ $value->estado }}</td>
                              <td>{{ $value->fecha_anulacion }}</td>
                              <td>{{ $value->persona_cedula }}</td>
                              <td>{{ $primer_nombre }}</td>
                              <td>{{ $segundo_nombre }}</td>
                              <td>{{ $primer_apellido }}</td>
                              <td>{{ $segundo_apellido }}</td>
                              <td>{{ $auxiliar }}</td>
                            </tr>
                            @endforeach
                        </tbody>

And here's my controller:

class OrdenesDeTallerController extends Controller
{
    public function __construct()
    {
        $this->middleware('auth');
    }

    public function index(Request $request)
    {
        $date1 = $request->get('datepicker1');
        $date2 = $request->get('datepicker2');    

        if($date1 != '' and $date2 != '')
        {
            if($date1 > $date2)
            {
                return view('OrdenesDeTaller')->withMessage('La fecha ingresada es inválida.');
            }

            $busqueda_fecha = DB::connection('odbc')->table('PUB.tl06_orden_trabajo_cabecera as a')->select('a.codigo_empresa', 'a.codigo_sucursal', 'a.codigo_taller', 'a.secuencia_orden', 'a.persona_numero_control', 'a.numero_orden', 'a.anio_modelo', 'a.codigo_marca', 'a.codigo_modelo', 'c.persona_ruc', 'c.persona_nombre', 'a.numero_orden', 'a.viene_de_cita', 'a.chasis', 'a.placa', 'a.kilometraje', 'a.numero_motor', 'a.anio_modelo', 'a.reparaciones_solicitadas', 'a.observacion', 'a.fecha_recepcion', 'a.fecha_ofrece', 'a.fecha_liquidacion', 'a.estado', 'a.fecha_anulacion', 'b.persona_cedula', 'b.persona_nombre', 'b.persona_nombre')->leftJoin('PUB.tg04_personas as b', 'b.persona_numero', '=', 'a.persona_numero_control')->leftJoin('PUB.tg04_personas as c', 'c.persona_numero', '=', 'a.persona_numero_aseguradora')->where('codigo_empresa', 2)->where('codigo_taller', 'VTAHI')->whereBetween('fecha_recepcion', [$date1, $date2])->get();

            if(count($busqueda_fecha) > 0)
            {
                $fechas = ['desde' => $date1, 'hasta' => $date2];
                return view('OrdenesDeTaller')->withDetails($busqueda_fecha)->with($fechas);
            }
            elseif(count($busqueda_fecha) === 0)
            {
                return view('OrdenesDeTaller')->withMessage('No se ha encontrado ningún registro.');
            }
        }        
        
        return view('OrdenesDeTaller');
    }

    public function txt()
    {
        $txt = null; // I need to put all that data here to download as text file.

        return response($txt)
                ->withHeaders([
                    'Content-Type' => 'text/plain',
                    'Cache-Control' => 'no-store, no-cache',
                    'Content-Disposition' => 'attachment; filename="logs.txt',
                ]);
    }

}

I need to put all variables listed in the view as I mentioned into txt() function, then put that data into a text file and download it. I don't know how to do that.

I was found AJAX and HIDDEN FORMS solutions but nothing works. Please help! :(

Mar
26
2 months ago
Activity icon

Replied to Ambiguous Reference In Query

I tried that and now it gives me the following error:

Column "a.persona_numero_control" cannot be found or is not specified for query.

I don't know how to write this as Eloquent query:

INNER JOIN PUB."tg04_personas" b
ON b.persona_numero = a.persona_numero_control
LEFT JOIN PUB."tg04_personas" c
ON c.persona_numero = a.persona_numero_aseguradora

so that it works when I call in the SELECT:

c.persona_nombre AS AS_NOMBRE_ASEGURADORA, 
b.persona_nombre AS PRIMER_NOMBRE_ASESOR_SERVICIO
Mar
25
2 months ago
Activity icon

Started a new Conversation Ambiguous Reference In Query

Greetings!

I have this error:

Illuminate/Database/QueryException with message 'SQLSTATE[HY000]: General error: 0 [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPEN EDGE]Column reference "persona_numero" is ambiguous. (13852) (SQLPrepare[0] at ext/pdo_odbc/odbc_driver.c:204) (SQL: select count(*) as aggregate from "PUB"."tl06_orden_trabajo_cabecera" inner join "PUB"."tg04_personas" on "persona_numero" = "persona_numero_control" left join "PUB"."tg04_personas" on "persona_numero" = "persona_numero_aseguradora" where "codigo_empresa" = 2 and "codigo_taller" = VTAHI and "fecha_recepcion" = 2018-02-20)'

And this is the query:

SuperDealer::raw('SELECT a.codigo_empresa, a.codigo_sucursal, a.codigo_taller, a.secuencia_orden, a.persona_numero_control, a.numero_orden ASOT_ID_ORDEN, a.anio_modelo AS AN_ID_ANTIGUEDAD, a.codigo_marca AS MA_ID_MARCA, a.codigo_modelo AS MO_ID_MODELO,c.persona_cedula AS AS_ID_ASEGURADORA,c.persona_nombre AS AS_NOMBRE_ASEGURADORA, a.numero_orden AS OT_NUMERO_OT, a.chasis AS OT_VIN, a.placa AS OT_PLACA, a.kilometraje AS OT_KM, a.numero_motor AS OT_NUMERO_MOTOR, a.anio_modelo AS OT_ANIO_FABRICACION,a.reparaciones_solicitadas AS OT_DESCRIPCION_TRABAJO, a.observacion AS OT_OBSERVACIONES, a.fecha_recepcion AS OT_FECHA_INGRESO, a.fecha_ofrece AS OT_FECHA_PROMETIDA, a.fecha_liquidacion AS FECHA_ENTREGA, a.estado AS ID_ESTADO, a.fecha_anulacion AS OT_FECHA_ANULACION, b.persona_cedula AS ID_ASESOR_SERVICIO, b.persona_nombre AS PRIMER_NOMBRE_ASESOR_SERVICIO, b.persona_nombre AS AUXILIAR FROM PUB."tl06_orden_trabajo_cabecera"')
->join('PUB.tg04_personas', 'persona_numero', '=', 'persona_numero_control')
->leftJoin('PUB.tg04_personas','persona_numero','=','persona_numero_aseguradora')
->where('codigo_empresa', 2)->where('codigo_taller', 'VTAHI')
->whereBetween('fecha_recepcion', [$date1, $date2])->get();

I know that persona_numero was tipped twice, but I don't know how to turn the following query to Eloquent query:

SELECT a.codigo_empresa, a.codigo_sucursal, a.codigo_taller, a.secuencia_orden, a.persona_numero_control, a.numero_orden AS OT_ID_ORDEN, a.anio_modelo AS AN_ID_ANTIGUEDAD, a.codigo_marca AS MA_ID_MARCA, a.codigo_modelo AS MO_ID_MODELO,c.persona_cedula AS AS_ID_ASEGURADORA,c.persona_nombre AS AS_NOMBRE_ASEGURADORA,a.numero_orden AS OT_NUMERO_OT, a.chasis AS OT_VIN, a.placa AS OT_PLACA, a.kilometraje AS OT_KM, a.numero_motor AS OT_NUMERO_MOTOR, a.anio_modelo AS OT_ANIO_FABRICACION,a.reparaciones_solicitadas AS OT_DESCRIPCION_TRABAJO, a.observacion AS OT_OBSERVACIONES, a.fecha_recepcion AS OT_FECHA_INGRESO, a.fecha_ofrece AS OT_FECHA_PROMETIDA, a.fecha_liquidacion AS FECHA_ENTREGA, a.estado AS ID_ESTADO, a.fecha_anulacion AS OT_FECHA_ANULACION,b.persona_cedula AS ID_ASESOR_SERVICIO, b.persona_nombre AS PRIMER_NOMBRE_ASESOR_SERVICIO, b.persona_nombre AS AUXILIAR FROM PUB."tl06_orden_trabajo_cabecera" a INNER JOIN PUB."tg04_personas" b ON b.persona_numero = a.persona_numero_control LEFT JOIN PUB."tg04_personas" c ON c.persona_numero = a.persona_numero_aseguradora WHERE a.codigo_empresa = '2' AND a.codigo_taller = 'VTAHI' AND a.numero_orden = '13514';

Please help! :(

Mar
18
2 months ago
Activity icon

Replied to Saving Remote Data To Local Database

How can I do that?

The button solution is that bad?

Activity icon

Started a new Conversation Saving Remote Data To Local Database

Hi everyone.

I hope to explain myself properly. I show data in my view from remote database. That data was retrieved with a form and two inputs type date.

I need a button to store the data retrieved with that form into local database. When I press the button "Guardar", the data in local database needs to be erased and replaced with the data showed in the view.

Here's my controller.

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\SuperDealer;

class OrdenesDeTallerController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
    public function index(Request $request)
    {
        $date1 = $request->get('datepicker1');
        $date2 = $request->get('datepicker2');    

        if($date1 != '' and $date2 != '')
        {
            if($date1 > $date2)
            {
                return view('OrdenesDeTaller')->withMessage('La fecha ingresada es inválida.');
            }

            $busqueda_fecha = SuperDealer::where('codigo_empresa', 2)->where('codigo_taller', 'VTAHI')->whereBetween('fecha_recepcion', [$date1, $date2])->get();

            if(count($busqueda_fecha) > 0)
            {
                $fechas = ['desde' => $date1, 'hasta' => $date2];
                return view('OrdenesDeTaller')->withDetails($busqueda_fecha)->with($fechas);
            }
            elseif(count($busqueda_fecha) === 0)
            {
                return view('OrdenesDeTaller')->withMessage('No se ha encontrado ningún registro.');
            }
        }        

        return view('OrdenesDeTaller');
    }
}

Here's my view.

@extends('layouts.admin')

@section('main-content')

    <!-- Page Heading -->
    <div class="container">
        <form class="form-inline text-center" action="{{ route('ordenes_de_taller') }}" method="POST" role="search">
            {{ csrf_field() }}
            <div class="input-group col-md-4">
                <input type="date" class="form-control" name="datepicker1" required>
            </div>
            <div class="input-group col-md-4">
                <input type="date" class="form-control" name="datepicker2" required>
            </div>
            <button type="submit" class="btn btn-primary">Consultar</button>
        </form>
        
        <br>
        
        <button type="submit" class="btn btn-success">Guardar</button>
        <button type="submit" class="btn btn-danger">Generar</button>
    </div>

    <br>

    @if(isset($details))

    <div class="row justify-content-center">

        <div class="col-lg">

            <div class="card shadow mb-4">

                <div class="table-responsive">
                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th scope="col">ID_FORMATO</th>
                            <th scope="col">ID_CONCESIONARIO</th>
                            <th scope="col">ID_SUCURSAL</th>
                            <th scope="col">OT_ID_ORDEN</th>
                            <th scope="col">AN_ID_ANTIGUEDAD</th>
                            <th scope="col">MA_ID_MARCA</th>
                            <th scope="col">MO_ID_MODELO</th>
                            <th scope="col">AS_ID_ASEGURADORA</th>
                            <th scope="col">AS_NOMBRE_ASEGURADORA</th>
                            <th scope="col">OT_NUMERO_OT</th>
                            <th scope="col">OT_CITA</th>
                            <th scope="col">OT_VIN</th>
                            <th scope="col">OT_PLACA</th>
                            <th scope="col">OT_KM</th>
                            <th scope="col">OT_NUMERO_MOTOR</th>
                            <th scope="col">OT_ANO_FABRICACION</th>
                            <th scope="col">OT_DESCRIPCION_TRABAJO</th>
                            <th scope="col">OT_OBSERVACIONES</th>
                            <th scope="col">OT_FECHA_INGRESO</th>
                            <th scope="col">OT_FECHA_PROMETIDA</th>
                            <th scope="col">OT_FECHA_ENTREGA</th>
                            <th scope="col">OT_FECHA_OT</th>
                            <th scope="col">ID_ESTADO</th>
                            <th scope="col">OT_FECHA_ANULACION</th>
                            <th scope="col">ID_ASESOR_SERVICIO</th>
                            <th scope="col">PRIMER_NOMBRE_ASESOR_SERVICIO</th>
                            <th scope="col">SEGUNDO_NOMBRE_ASESOR_SERVICIO</th>
                            <th scope="col">PRIMER_APELLIDO_ASESOR_SERVICIO</th>
                            <th scope="col">SEGUNDO_APELLIDO_ASESOR_SERVICIO</th>
                            <th scope="col">AUXILIAR</th>
                        </tr>
                        </thead>
                        <tbody>
                            @foreach ($details as $value)
                            <tr>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                              <td>{{ $value->numero_orden }}</td>
                              <td>{{ $value->anio_modelo }}</td>
                              <td>{{ $value->codigo_marca }}</td>
                              <td>{{ $value->codigo_modelo }}</td>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                              <td>{{ $value->chasis }}</td>
                              <td>{{ $value->placa }}</td>
                              <td>{{ $value->kilometraje }}</td>
                              <td>{{ $value->numero_motor }}</td>
                              <td>{{ $value->anio_modelo }}</td>
                              <td>{{ $value->reparaciones_solicitadas }}</td>
                              <td>{{ $value->observacion }}</td>
                              <td>{{ $value->fecha_recepcion }}</td>
                              <td>{{ $value->fecha_ofrece }}</td>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                              <td>{{ $value->estado }}</td>
                              <td>{{ $value->fecha_anulacion }}</td>
                              <td>{{ $value->persona_numero_control }}</td>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                              <td>PENDIENTE</td>
                            </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>

            </div>

        </div>

    </div>

    @elseif(isset($message))
    <p class="alert alert-danger">{{ $message }}</p>

    @endif
    
@endsection

And this is my seeder (I don't know if this is a good solution to store the data and it doesn't work yet).

<?php

use Illuminate\Database\Seeder;

use Illuminate\Http\Request;

use App\SuperDealer;

class OrdenesDeTallerSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run(Request $request)
    {
        $date1 = $request->get('datepicker1');
        $date2 = $request->get('datepicker2');

        SuperDealer::where('codigo_empresa', 2)->where('codigo_taller', 'VTAHI')
        ->whereBetween('fecha_recepcion', [$date1, $date2])->get();
    }
}

Please help! :(