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 613

ErrorException:

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

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

Backtrace:

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