Skip to content

Commit

Permalink
Fix: Accept provider enum (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixlive authored Oct 14, 2024
1 parent 397fa8c commit 339c4dc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Concerns/HasProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
namespace EchoLabs\Prism\Concerns;

use EchoLabs\Prism\Contracts\Provider;
use EchoLabs\Prism\Enums\Provider as ProviderEnum;

trait HasProvider
{
protected Provider $provider;

public function using(string $provider, string $model): self
public function using(ProviderEnum|string $provider, string $model): self
{
$this->provider = app('prism-manager')->resolve($provider);
$this->provider->usingModel($model);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Drivers;
namespace Tests\Providers;

use EchoLabs\Prism\Facades\Tool;
use EchoLabs\Prism\Prism;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Drivers;
namespace Tests\Providers;

use EchoLabs\Prism\Facades\Tool;
use EchoLabs\Prism\Prism;
Expand Down

0 comments on commit 339c4dc

Please sign in to comment.