Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defere loading to ensure translations work #187

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/FilamentFabricatorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Z3d0X\FilamentFabricator;

use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Str;
Expand All @@ -14,7 +15,7 @@
use Z3d0X\FilamentFabricator\Layouts\Layout;
use Z3d0X\FilamentFabricator\PageBlocks\PageBlock;

class FilamentFabricatorServiceProvider extends PackageServiceProvider
class FilamentFabricatorServiceProvider extends PackageServiceProvider implements DeferrableProvider
{
public function configurePackage(Package $package): void
{
Expand Down Expand Up @@ -60,6 +61,11 @@ protected function getCommands(): array
return array_merge($commands, $aliases);
}

public function provides(): array
{
return [FilamentFabricatorManager::ID];
}

public function packageRegistered(): void
{
parent::packageRegistered();
Expand Down