Fenos\Notifynder\Categories\CategoryRepository::find PHP Метод

find() публичный Метод

Find By Id.
public find ( $categoryId ) : mixed
$categoryId
Результат mixed
    public function find($categoryId)
    {
        return $this->categoryModel->find($categoryId);
    }

Usage Example

 /** @test */
 function it_delete_a_category_by_id()
 {
     $categoryToDelete = $this->createCategory();
     $this->categoryRepo->delete($categoryToDelete->id);
     $tryToFindThatCategory = $this->categoryRepo->find($categoryToDelete->id);
     $this->assertEquals($tryToFindThatCategory, null);
 }