src/Services/BoardService.php
public function getBoard($name)
    {
        $byName = Models\Board::search()
          ->where('name', $name)
          ->execOne();
        $bySlug = Models\Board::getBySlug($name);
        return $bySlug instanceof Models\Board ? $bySlug : $byName;
    }
public function getBoard($name)
    {
        $byName = Models\Board::search()
          ->where('name', $name)
          ->execOne();
        $bySlug = Models\Board::getBySlug($name);
        return $bySlug instanceof Models\Board ? $bySlug : $byName;
    }
public function getBoard ( $ name ) { $ byName = Models \ Board :: search ( ) -> where ( 'name' , $ name ) -> execOne ( ) ; $ bySlug = Models \ Board :: getBySlug ( $ name ) ; return $ bySlug instanceof Models \ Board ? $ bySlug : $ byName ; }
Get Board by Name or Slug.
@param $name
@return Models\Board
Get Board by Name or Slug .