PHPackages                             reivaj86/chef-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. reivaj86/chef-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

reivaj86/chef-auth
==================

09PHP

Since Aug 17Pushed 10y ago1 watchersCompare

[ Source](https://github.com/reivaj86/ChefAuth)[ Packagist](https://packagist.org/packages/reivaj86/chef-auth)[ RSS](/packages/reivaj86-chef-auth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Chef Authorization
==================

[](#chef-authorization)

\##Recipes, Ingredients and Category Login "Chef-Captcha" for Laravel 5

Powerful package to implement a simple but effective login authorization step. Replace the normal Word Captcha system with this package. It will provide a very dynamic and interactive way for users to login with additional security.

Install
-------

[](#install)

Install this package in through Composer.

```
{
    "require": {
        "reivaj86/chef-auth": "dev-master"
    }
}
```

```
Run

$ composer update

```

Add the package ChefAuthServiceProvider to your application service providers in `config/app.php`

```
'providers' => [

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...

    'Reivaj86\ChefAuth\ChefAuthServiceProvider',

],
```

Publish the package migrations and config file to your application.

```
$ php artisan vendor:publish --provider="Vendor/Reivaj86/ChefAuth/ChefAuthServiceProvider" --tag="config"
$ php artisan vendor:publish --provider="Vendor/Reivaj86/ChefAuth/ChefAuthServiceProvider" --tag="migrations"

```

Run migrations.

```
$ php artisan migrate

```

### Configuration file --- chef-auth.php

[](#configuration-file-----chef-authphp)

You can change connection for models, slug separator and there is also a handy cookable feature. Study the config file for more information.

Usage
-----

[](#usage)

First of all, include `HasIngredient` trait and also implement `HasIngredientContract` inside your `User` model.

```
use Reivaj86\ChefAuth\Contracts\HasIngredientContract;
use Reivaj86\ChefAuthTraits\HasIngredient;

class Recipe extends Model implements HasIngredientContract {

	use HasIngredient;
```

You're set to go. You can create your first recipe, ingredient and category database.

```
use Reivaj86\ChefAuth\Models\Recipe;

$recipe = Recipe::create([
    'name' => 'Carbonara',
    'slug' => 'carbonara',
    'img'  => 'assets/imgs/carbonara.png'
    'description' => 'Delicious italian pasta dish' // optional
]);
```

You then can create your first ingredient and attach it to a recipe.

```
use Reivaj86\ChefAuth\Models\Ingredient;
use Reivaj86\ChefAuth\Models\Recipe;

$ingredient = Ingredient::create([
    'name' => 'Eggs',
    'slug' => 'eggs',
    'description' => '' // optional
]);

$recipe = Recipe::find($id)->attachIngredient($ingredient); // Can pass whole object, or only its id
```

You can check if the current recipe has required ingredient.

```
if ($recipe->cooks('eggs')) // you can pass an id or slug
{
    return 'eggs'; // Or an image (return recipe->img;)

}
```

You can also do this:

```
if ($recipe->cooksEggs())
{
    return 'eggs';
}
```

And of course, there is a way to check for multiple ingredients:

```
if ($recipe->cooks('eggs|cheese')) // or $recipe->cooks('eggs, cheese') and also $recipe->cooks(['eggs', 'cheese'])
{
    // if recipe has at least one ingredient
}

if ($recipe->cooks('eggs|cheese', 'All')) // or $user->cooks('eggs, cheese', 'All') and also $recipe->cooks(['eggs', 'cheese'], 'All')
{
    // if recipe has all ingredients
}
```

When you are creating ingredients, there is also optional parameter `img`. It is set to `null` by default, but you can overwrite it and then you can do something like this:

```
if (!$ingredient->img = null)
{
    // code
}
```

Let's talk about categories in general. You can attach a category to an ingredient or directly to a specific ingredient (and of course detach them as well).

```
use Reivaj86\ChefAuth\Models\Category;
use Reivaj86\ChefAuth\Models\Ingredient;

$category = Category::create([
    'name' => 'Dairy',
    'slug' => 'dairy',
    'description' => 'Dairy products' // optional
]);

Ingredient::find($id)->attachCategory($category);

if ($ingredient->is('dairy') // you can pass an id or slug
{
    return 'Is a Dairy Product!';
}
```

You can check for multiple categories the same way as ingredients.

This condition checks if the current recipe is the owner of provided ingredient. If not, it will be looking inside ingredient categories for a row we created before.

```
if ($ingredient->steamed('dairy', $product, false)) // now owner check is disabled
{
    $product->save();
}
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1981d7515d66b64c2bb2dff3bda78aeb785d7e981fd23fe6720b9a0daf094c85?d=identicon)[reivaj86](/maintainers/reivaj86)

---

Top Contributors

[![Javeeto7](https://avatars.githubusercontent.com/u/9990617?v=4)](https://github.com/Javeeto7 "Javeeto7 (5 commits)")

### Embed Badge

![Health badge](/badges/reivaj86-chef-auth/health.svg)

```
[![Health](https://phpackages.com/badges/reivaj86-chef-auth/health.svg)](https://phpackages.com/packages/reivaj86-chef-auth)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
