use HasMetadata;
use TrackResourceProgress;
#[ResourceProgressSuite(suite: 'progress', name: 'Progress')]
#[ResourceProgressSuite(suite: 'publish', name: 'Publish', fields: ['name', 'intro'])]
class Product extends ModelsProduct implements HasMedia, Sortable
{
// Optional if you dont provide the fields in the attribute
public function getProgressRequiredFields(): array
{
return ['name', 'intro', 'description', 'supplier_id', 'product_category_id'];
}
}
public function setPublishActions(): array
{
return [
\Marshmallow\ResourceProgress\Actions\FieldFilled::class,
];
}
artisan make:resource-progress-action MissingTranslationsAction
a make:resource-progress-suite SeoSuite
#[ResourceProgressSuite(suite: 'progress', name: 'Progress')]
#[ResourceProgressSuite(suite: 'publish', name: 'Publish')]
#[ResourceProgressSuite(suite: 'seo', name: 'SEO')]
class Product extends ModelsProduct implements HasMedia, Sortable
ResourceProgress::make(__('Progress')),
// Selected resources
IndexResourceProgress::make(),
// All resources
IndexResourcesProgress::make(self::class)->standalone(),
``