Configuration
Implement the ResourceInterface in your model class.
namespace App\Entity;
use Sylius\Resource\Model\ResourceInterface;
class Book implements ResourceInterface
{
// Most of the time you have the code below already in your class.
protected $id;
public function getId()
{
return $this->id;
}
}Configure the class as a resource.
You can also configure several doctrine drivers.
Update the resource repository
Generate API routing.
Generate web routing.
Last updated
Was this helpful?
