PHP code example of buzkall / finisterre

1. Go to this page and download the library: Download buzkall/finisterre 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/ */

    

buzkall / finisterre example snippets


'model_policy' => Arzcode\Finisterre\Policies\FinisterreTaskPolicy::class,

use Arzcode\Finisterre\FinisterrePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FinisterrePlugin::make(),
        ]);
}

FinisterrePlugin::make()
    ->userCanViewAllTasks(fn() => auth()->user()?->hasRole(RoleEnum::Admin))
    ->userCanViewOnlyTheirTasks(fn() => auth()->user()?->hasAnyRole([RoleEnum::Editor, RoleEnum::Manager]))
    ->userCanScheduleComments(fn() => auth()->user()?->hasRole(RoleEnum::Admin))
    ->userCanConfigureFinisterre(fn() => auth()->user()?->hasRole(RoleEnum::Admin)),

'authenticatable_attribute' => ['name', 'lastname'],

use Arzcode\Finisterre\Contracts\FinisterreReportable;
use Arzcode\Finisterre\Traits\InteractsWithFinisterreReports;

class Order extends Model implements FinisterreReportable
{
    use InteractsWithFinisterreReports;
}

public function getFinisterreReportLabel(): string
{
    return "Order {$this->reference}";
}

public function getFinisterreReportUrl(): ?string
{
    return route('orders.show', $this);
}

use Arzcode\Finisterre\Filament\Actions\ReportIssueAction;

ReportIssueAction::make();
bash
php artisan filament:assets
bash
php artisan vendor:publish --tag="finisterre-migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="Spatie\Tags\TagsServiceProvider" --tag="tags-migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="finisterre-views"
bash
php artisan vendor:publish --tag="finisterre-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="finisterre-migrations"
php artisan migrate