Skip to content

Commit

Permalink
Fixes non-usage of livewire.view_path configuration (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro authored Jan 3, 2024
1 parent c72d319 commit 4cbedd0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function registerVoltServiceProvider(): void
*/
protected function ensureLivewireDirectoryExists(): void
{
if (! is_dir($directory = resource_path('views/livewire'))) {
if (! is_dir($directory = config('livewire.view_path', resource_path('views/livewire')))) {
File::ensureDirectoryExists($directory);

File::put($directory.'/.gitkeep', '');
Expand Down
2 changes: 1 addition & 1 deletion src/Console/MakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function getPath($name): string
{
$paths = Volt::paths();

$mountPath = isset($paths[0]) ? $paths[0]->path : resource_path('views/livewire');
$mountPath = isset($paths[0]) ? $paths[0]->path : config('livewire.view_path', resource_path('views/livewire'));

return $mountPath.'/'.Str::lower(Str::finish($this->argument('name'), '.blade.php'));
}
Expand Down
2 changes: 1 addition & 1 deletion stubs/VoltServiceProvider.stub
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class VoltServiceProvider extends ServiceProvider
public function boot(): void
{
Volt::mount([
resource_path('views/livewire'),
config('livewire.view_path', resource_path('views/livewire')),
resource_path('views/pages'),
]);
}
Expand Down

0 comments on commit 4cbedd0

Please sign in to comment.