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 619

ErrorException:

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

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

Backtrace:

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