1. Go to this page and download the library: Download mixdinternet/categories 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/ */
namespace Mixdinternet\Flavors;
use Mixdinternet\Categories\Category as BaseCategory;
use Mixdinternet\Flavors\Scopes\FlavorsCategory;
class Category extends BaseCategory
{
public static function boot()
{
static::addGlobalScope(new FlavorsCategory());
}
public function flavors()
{
return $this->hasMany(Flavor::class);
}
}
public function flavors()
{
return $this->hasMany(Flavor::class);
}