1. Go to this page and download the library: Download fayne/laravel-filament-menu 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/ */
fayne / laravel-filament-menu example snippets
use Fayne\Menu\Filament\MenuPlugin;
return $panel->plugins([
// Keep the host's existing plugins.
MenuPlugin::make(),
]);
namespace App\Models;
class Menu extends \Fayne\Menu\Models\Menu
{
}
namespace App\Filament\Resources;
use Fayne\Menu\Filament\Resources\MenuResource as BaseMenuResource;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
class MenuResource extends BaseMenuResource
{
public static function form(Schema $schema): Schema
{
$schema = parent::form($schema);
return $schema->components([
...$schema->getComponents(),
TextInput::make('settings.project_note'),
]);
}
}