title: Laravel livewire: use as a laravel controller
body: <p>I use in my app to do instant searches. indeed I displayed the establishment's with its files which are displayed in my <strong>controller show</strong> as follows:</p>
  <pre><code>public function show($id)
  {
      $etablissements = Etablissement::find($id);
      $faculty = $etablissements-&gt;filieres;
      return view('etablissements/edhec/touteslesfilieresedhec', compact('faculty','etablissements'));
  }
  </code></pre>
  <p>now i tried to do the same in my livewire component in order to be able to do a search as follows:</p>
  <pre><code>class SchoolfaclutysList extends Component
  {
    public $faculty;
    public function mount($id)
  {
      $etablissements = Etablissement::find($id);
      $this-&gt;faculty = $etablissements-&gt;filieres;
  }
  
  public function render()
  {
      return view('livewire.schoolfaclutys-list');
  }
  }
  </code></pre>
  <p>but he returns the empty page to me
  <strong>view blade</strong></p>
  <pre><code>&lt;div class=&quot;container my-5&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
          &lt;div class=&quot;col text-center&quot;&gt;
              &lt;a href=&quot;{{ route('filiere.show', ['filiere' =&gt; $etablissements-&gt;id]) }}&quot; class=&quot;btn btn-outline-success rounded-pill mr-3 font-weight-bold text_info&quot;&gt;Informations générales&lt;/a&gt;
              &lt;a href=&quot;{{ route('filieresedhec') }}&quot; class=&quot;btn btn-outline-success rounded-pill ml-5 font-weight-bold text_filière&quot;&gt;Filières/Facultés&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    @livewire('schoolfaclutys-list')
    &lt;/div&gt;
    &lt;!-- Debut footer --&gt;
      @include('layouts/partials/_footer')
    &lt;!-- Fin footer --&gt;
  </code></pre>
  <p><strong>web-php</strong></p>
  <pre><code>route::resource('school','schoolController');
  </code></pre>
  <p>is it possible to make it work as a laravel controller? Thank you</p>