/** * Finds a Category by it's slug * * @param string * @return Category * @throws \Illuminate\Database\Eloquent\ModelNotFoundException */ public function findBySlug($slug) { return Category::whereSlug($slug)->firstOrFail(); }