You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a package with Spatie Package Tools, like below.
Add a view package, and use hasViewPackage() method.
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Spatie\LaravelPackageTools\Package;
class AwesomePackageServiceProvider extends PackageServiceProvider
{
public function configurePackage(Package $package): void
$package
->hasViewComponent('nitrogen', Menu::class)
...
If you put the View Component's PHP part to src/View/Components, then the publish command will not run, it will say, the PHP file is missing from src/Components. If you move the folder, and the file to this location, publish will not run, but Laravel will say, View Component is missing from View/Components folder. So the quick and dirty solution is using PHP file in both location, but it's not okay, double to maintain.
The issue is here, the word 'View' is missing from the path. If I put the word "View" there, the publish command will work without any issue, and of course Laravel too...
Steps to reproduce:
The issue is here, the word 'View' is missing from the path. If I put the word "View" there, the publish command will work without any issue, and of course Laravel too...
The text was updated successfully, but these errors were encountered: