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 617

ErrorException:

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

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

Backtrace:

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