Skip to content

Commit

Permalink
Support default Livewire V3 location (#62)
Browse files Browse the repository at this point in the history
* Support default Livewire V3 location

* fix style

Signed-off-by: Skyler Katz <skylerkatz@hey.com>

* simplify based on config value

Signed-off-by: Skyler Katz <skylerkatz@hey.com>

---------

Signed-off-by: Skyler Katz <skylerkatz@hey.com>
  • Loading branch information
skylerkatz authored Jan 31, 2024
1 parent 14bea2d commit 392f914
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Support/AutoDiscoveryHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,16 @@ public function listenerDirectoryFinder(): FinderCollection

public function livewireComponentFileFinder(): FinderCollection
{
$directory = $this->base_path.'/*/src';

if (str_contains(config('livewire.class_namespace'), '\\Http\\')) {
$directory .= '/Http';
}

$directory .= '/Livewire';

return FinderCollection::forFiles()
->name('*.php')
->inOrEmpty($this->base_path.'/*/src/Http/Livewire');
->inOrEmpty($directory);
}
}

1 comment on commit 392f914

@polodev
Copy link

@polodev polodev commented on 392f914 Feb 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-02-06 at 3 14 47 AM

getting The "--module" option does not exist. message when trying make:livewire command.

using "internachi/modular": "dev-main" vesion

Please # to comment.