FluxBB\Models\CategoryRepository::findBySlug PHP Method

findBySlug() public method

public findBySlug ( $slug )
    public function findBySlug($slug)
    {
        $row = $this->database->table('categories')->where('slug', $slug)->first();
        if (is_null($row)) {
            throw new Exception('Category does not exist.');
        }
        return $row;
    }