Skip to content

Commit

Permalink
Merge pull request #15 from savannabits/laravel-10
Browse files Browse the repository at this point in the history
Support for Laravel 10
  • Loading branch information
coolsam726 authored Feb 26, 2023
2 parents 02a84d8 + 0d9eaf4 commit b509e16
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 40 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"require": {
"php": "^8.0",
"filament/filament": "^2.0",
"illuminate/contracts": "^9.0",
"livewire/livewire": "^2.10",
"illuminate/contracts": "^9.0|^10.0",
"livewire/livewire": "^2.12",
"mhmiton/laravel-modules-livewire": "^1.5",
"nwidart/laravel-modules": "^9.0",
"nwidart/laravel-modules": "^9.0|^10.0",
"spatie/laravel-package-tools": "^1.13.5"
},
"require-dev": {
Expand Down
6 changes: 0 additions & 6 deletions src/Commands/FilamentModuleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ protected function getContextInput(): string

/**
* Get the console command arguments.
*
* @return array
*/
protected function getArguments(): array
{
Expand All @@ -84,8 +82,6 @@ protected function getArguments(): array

/**
* Get the console command options.
*
* @return array
*/
protected function getOptions(): array
{
Expand Down Expand Up @@ -230,9 +226,7 @@ protected function copyStubToApp(string $stub, string $targetPath, array $replac
/**
* Install the service provider in the application configuration file.
*
* @param string $after
* @param string $providerClass | Fully namespaced service class
* @return void
*/
protected function installServiceProvider(string $providerClass, string $after = 'RouteServiceProvider'): void
{
Expand Down
9 changes: 0 additions & 9 deletions src/ContextManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,18 @@

class ContextManager extends FilamentManager
{
/**
* @var string|null
*/
protected static ?string $config = null;

public function __construct($config)
{
static::$config = $config;
}

/**
* @return Guard|null
*/
public static function getAuth(): ?Guard
{
return static::$config ? auth()->guard(config(static::$config.'.auth.guard')) : null;
}

/**
* @return Guard
*/
public function auth(): Guard
{
return static::getAuth() ?? auth()->guard(config('filament.auth.guard'));
Expand Down
16 changes: 0 additions & 16 deletions src/FilamentModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ class FilamentModules

protected ?string $currentContext = null;

/**
* @param FilamentManager $filament
*/
public function __construct(FilamentManager $filament)
{
$this->contexts['filament'] = $filament;
}

/**
* @param string|null $context
* @return $this
*/
public function setContext(string $context = null)
Expand All @@ -33,9 +29,6 @@ public function setContext(string $context = null)
return $this;
}

/**
* @return string
*/
public function currentContext(): string
{
return $this->currentContext ?? 'filament';
Expand All @@ -49,16 +42,12 @@ public function getContext()
return $this->contexts[$this->currentContext ?? 'filament'];
}

/**
* @return array
*/
public function getContexts(): array
{
return $this->contexts;
}

/**
* @param string $name
* @return $this
*/
public function addContext(string $name)
Expand All @@ -69,8 +58,6 @@ public function addContext(string $name)
}

/**
* @param string $context
* @param callable $callback
* @return $this
*/
public function forContext(string $context, callable $callback)
Expand All @@ -87,7 +74,6 @@ public function forContext(string $context, callable $callback)
}

/**
* @param callable $callback
* @return $this
*/
public function forAllContexts(callable $callback)
Expand All @@ -108,8 +94,6 @@ public function forAllContexts(callable $callback)
/**
* Dynamically handle calls into the filament instance.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call(string $method, array $parameters)
Expand Down
3 changes: 0 additions & 3 deletions src/FilamentModulesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ public function packageRegistered(): void
});
}

/**
* @return void
*/
public function packageBooted(): void
{
Livewire::addPersistentMiddleware([
Expand Down
3 changes: 0 additions & 3 deletions src/Http/Middleware/ApplyContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ class ApplyContext
/**
* Handle an incoming request.
*
* @param Request $request
* @param Closure $next
* @param $context
* @return mixed
*/
public function handle(Request $request, Closure $next, $context)
Expand Down

0 comments on commit b509e16

Please sign in to comment.