Fatal error: Call to a member function partials() on a non-object in /home/miamibea/public_html/inc/core/models/Pages/Page.php on line 618

ErrorException:

Call to a member function partials() on a non-object

File: /home/miamibea/public_html/inc/core/models/Pages/Page.php: 618

Backtrace:

  1. file:
    /home/miamibea/public_html/inc/core/models/Pages/Page.php
    line:
    618
    function:
    ErrorException
    source:
    613             $datas[$id] = [];
    614         }
    615 
    616         /** @var Page $page */
    617         $page = Page::with('partials')->where("id", $pageid)->first();
    618         $query = $page->partials();
    619         if ($query->count()) {
    620             $allPartials = $query->get();
    621             foreach($allPartials as $partial){
    622                 if(in_array($partial->pivot->id, $pivotids)) $datas[$partial->pivot->id] = $partial->getData();
    623             }