WSM \ Table \ Exception \ NotFoundException
Aucun enregistrement trouvé dans table posts WSM\Table\Exception\NotFoundException thrown with message "Aucun enregistrement trouvé dans table posts" Stacktrace: #4 WSM\Table\Exception\NotFoundException in /home/u433713558/domains/weegosoft.com/public_html/training/src/Table/PostTable.php:210 #3 WSM\Table\PostTable:findBySlug in /home/u433713558/domains/weegosoft.com/public_html/training/src/views/layout/training/header.php:34 #2 include in /home/u433713558/domains/weegosoft.com/public_html/training/src/views/layout/home.php:2 #1 require in /home/u433713558/domains/weegosoft.com/public_html/training/src/Router.php:74 #0 WSM\Router:run in /home/u433713558/domains/weegosoft.com/public_html/training/public/index.php:250
Stack frames (5)
4
WSM\Table\Exception\NotFoundException
/src/Table/PostTable.php210
3
WSM\Table\PostTable findBySlug
/src/views/layout/training/header.php34
2
include
/src/views/layout/home.php2
1
require
/src/Router.php74
0
WSM\Router run
/public/index.php250
/home/u433713558/domains/weegosoft.com/public_html/training/src/Table/PostTable.php
{
    $return = $this->findFirst(['fields'=>'guid', 
                 'clauses'=>"id=$id",
    ]) ; 
    
    if($return){
        return $return->getGUID();
    } 
    return $default ; 
}
 
public function findBySlug(string $slug):?Post
{
    $return = $this->findFirst([
                 'clauses'=>"slug='$slug'",
    ]) ; 
    
    if ($return===false) {
            
            throw new NotFoundException($this->table);
      
        }    
    return $return ; 
}
 
public function findByParent(int $parent):?array
{
    $return = $this->find(['fields'=>'*', 
                 'clauses'=>"parent=$parent",
    ]) ; 
    
    return $return ; 
}
 
 
//update a post 
public function update(Post $post):void
{
  $save = $this->save([
    'id'=>$post->getId(),