20 lines
418 B
PHP
20 lines
418 B
PHP
<?php
|
|
|
|
namespace Laravel\Nova\Console;
|
|
|
|
trait ResolvesStubPath
|
|
{
|
|
/**
|
|
* Resolve the fully-qualified path to the stub.
|
|
*
|
|
* @param string $stub
|
|
* @return string
|
|
*/
|
|
protected function resolveStubPath($stub)
|
|
{
|
|
return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
|
|
? $customPath
|
|
: __DIR__.str_replace('nova/', '', $stub);
|
|
}
|
|
}
|