Sindbad~EG File Manager

Current Path : /var/www/html/xfacil.desafio.com.py/app/Http/Livewire/
Upload File :
Current File : /var/www/html/xfacil.desafio.com.py/app/Http/Livewire/Frontencuestas.php

<?php

namespace App\Http\Livewire;

use Livewire\Component;
use Livewire\WithPagination;
use App\Models\Formulario;
use DB;
use Auth;

class Frontencuestas extends Component{

    use WithPagination;

    protected $paginationTheme = 'bootstrap';

    protected $queryString = ['search' => ['except' => '']];

    public $search='';

    public function render(){

        $encuestas = Formulario::where('for_nom','LIKE','%'.$this->search.'%')->where('for_estado',1)->where('for_tipo','encuesta')->orderBy('id','desc')->paginate(20);

        $respuestas = DB::table('respuestas as re')
            ->join('interrogantes as in','re.interrogante_id','in.id')
            ->join('competencias as co','in.competencia_id','co.id')
            ->join('formularios as fo','co.formulario_id','fo.id')
            ->where('fo.for_tipo','encuesta')
            ->where('re.usuario_id',Auth::user()->id)
            ->select('fo.id')->get();

        return view('livewire.frontencuestas',["encuestas"=>$encuestas,"respuestas"=>$respuestas]);
    }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists