Example #1
0
 /**
  * @param $name
  *
  * @return \Kalnoy\Nestedset\Node
  */
 public function findCategory($name, $withTrashed = false)
 {
     $q = Category::whereName($name);
     if ($withTrashed) {
         $q->withTrashed();
     }
     return $q->first();
 }