PHP code example of yacoubalhaidari / filament-tour
1. Go to this page and download the library: Download yacoubalhaidari/filament-tour 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 Filament\Resources\Resource;
use YacoubAlhaidari\FilamentTour\Concerns\HasTourSteps;
class MerchantResource extends Resource
{
use HasTourSteps;
public static function getTourStepId(): ?string
{
return 'merchants-list';
}
public static function getTourStepTitle(): ?string
{
return 'إدارة التجار';
}
public static function getTourStepDescription(): ?string
{
return 'وصف موجز لما يمكن للمستخدم القيام به هنا.';
}
public static function getTourStepFeatures(): array
{
return [
'إضافة تاجر جديد',
'تعديل بيانات التاجر',
'عرض حالة المحافظ والطلبات',
];
}
public static function getTourStepPosition(): string
{
// Shepherd position: top|bottom|left|right|center ...
return 'right';
}
public static function getTourStepSort(): int
{
// Lower numbers appear earlier in the tour
return 10;
}
}
use Filament\Pages\Page;
use YacoubAlhaidari\FilamentTour\Concerns\HasTourSteps;
class SignBuilder extends Page
{
use HasTourSteps;
protected static ?string $navigationLabel = 'Sign Builder';
public static function getTourStepId(): ?string
{
return 'sign-builder';
}
public static function getTourStepTitle(): ?string
{
return 'Sign Builder';
}
public static function getTourStepDescription(): ?string
{
return 'Place signature fields on your PDF documents.';
}
public static function getTourStepFeatures(): array
{
return [
'Add signature fields',
'Assign signers',
'Navigate document pages',
];
}
public static function getTourStepSort(): int
{
return 40;
}
}