Update project dependencies and enhance documentation
- Added `barryvdh/laravel-dompdf` to `composer.json` for PDF generation capabilities. - Updated `boost.json` to include `tailwindcss-development` in skills. - Modified `package.json` and `package-lock.json` to upgrade Tailwind CSS and related packages. - Improved README.md for clarity and corrected French language errors. - Created design system documentation for Filament components. - Added new Filament pages for Dashboard and Documentation with dynamic content loading. - Enhanced TablesExplorer functionality with improved table and column management.
This commit is contained in:
47
app/Filament/Pages/Documentation.php
Normal file
47
app/Filament/Pages/Documentation.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Pages\Page;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Documentation extends Page
|
||||
{
|
||||
protected static string|\BackedEnum|null $navigationIcon = Heroicon::OutlinedBookOpen;
|
||||
|
||||
protected static ?string $navigationLabel = 'Documentation';
|
||||
|
||||
protected static ?string $title = 'Documentation API';
|
||||
|
||||
protected static ?int $navigationSort = 0;
|
||||
|
||||
protected string $view = 'filament.pages.documentation';
|
||||
|
||||
public string $htmlContent = '';
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$markdownPath = base_path('documentation/documentation_api_logistics.md');
|
||||
$markdown = file_get_contents($markdownPath);
|
||||
$this->htmlContent = Str::markdown($markdown);
|
||||
}
|
||||
|
||||
public function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('download')
|
||||
->label('Télécharger en PDF')
|
||||
->icon(Heroicon::OutlinedArrowDownTray)
|
||||
->url(route('documentation.download-pdf'))
|
||||
->openUrlInNewTab(),
|
||||
|
||||
Action::make('see_in_another_tab')
|
||||
->label('Voir dans un nouvel onglet')
|
||||
->icon(Heroicon::OutlinedArrowTopRightOnSquare)
|
||||
->url(Documentation::getUrl())
|
||||
->openUrlInNewTab(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user