PHP code example of maize-tech / laravel-excludable

1. Go to this page and download the library: Download maize-tech/laravel-excludable library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maize-tech / laravel-excludable example snippets


return [

    /*
    |--------------------------------------------------------------------------
    | Exclusion model
    |--------------------------------------------------------------------------
    |
    | Here you may specify the fully qualified class name of the exclusion model.
    |
    */

    'exclusion_model' => Maize\Excludable\Models\Exclusion::class,
    
    /*
    |--------------------------------------------------------------------------
    | Has exclusion query
    |--------------------------------------------------------------------------
    |
    | Here you may specify the fully qualified class name of the exclusion query.
    |
    */

    'has_exclusion_query' => Maize\Excludable\Queries\HasExclusionQuery::class,
];

bash
php artisan vendor:publish --provider="Maize\Excludable\ExcludableServiceProvider" --tag="excludable-migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="Maize\Excludable\ExcludableServiceProvider" --tag="excludable-config"
 php


namespace App\Models;

use Maize\Excludable\Excludable;

class Article extends Model
{
    use Excludable;

    protected $fillable = [
        'title',
        'body',
    ];
}