1. Go to this page and download the library: Download wisoft/slug-history-bundle 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/ */
use Wisoft\SlugHistoryBundle\Service\Storage\SlugStorageInterface;
use Wisoft\SlugHistoryBundle\Service\Storage\CacheSlugStorage;
$services->alias(SlugStorageInterface::class, CacheSlugStorage::class);
use Wisoft\SlugHistoryBundle\Service\Storage\SlugStorageInterface;
use Wisoft\SlugHistoryBundle\Service\Storage\DatabaseSlugStorage;
$services->alias(SlugStorageInterface::class, DatabaseSlugStorage::class);
class Product
{
private Company $company;
private string $slug;
public function getCompany(): Company { return $this->company; }
public function getSlug(): string { return $this->slug; }
}
class Company
{
private string $name;
public function getName(): string { return $this->name; }
}