Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Sep 18, 2023
1 parent 1f9d6a6 commit a7793d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Concerns/UsesGeneratorOverrides.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Orchestra\Canvas\Core\Concerns;

use Illuminate\Support\Str;

trait UsesGeneratorOverrides
{
/**
* Get the destination class path.
*/
protected function getPathUsingCanvas(string $name): string
protected function getPath(string $name): string
{
$name = Str::replaceFirst($this->rootNamespace(), '', $name);

Expand All @@ -17,23 +19,23 @@ protected function getPathUsingCanvas(string $name): string
/**
* Get the root namespace for the class.
*/
protected function rootNamespaceUsingCanvas(): string
protected function rootNamespace(): string
{
return $this->generatorPreset()->rootNamespace();
}

/**
* Get the model for the default guard's user provider.
*/
protected function userProviderModelUsingCanvas(): ?string
protected function userProviderModel(): ?string
{
return $this->generatorPreset()->userProviderModel();
}

/**
* Get the first view directory path from the application configuration.
*/
protected function viewPathUsingCanvas(string $path = ''): string
protected function viewPath(string $path = ''): string
{
$views = $this->generatorPreset()->viewPath();

Expand Down

0 comments on commit a7793d9

Please sign in to comment.