{"id":15283894,"url":"https://github.com/codions/laravel-modules-livewire","last_synced_at":"2026-04-15T15:45:14.391Z","repository":{"id":171577653,"uuid":"648119702","full_name":"codions/laravel-modules-livewire","owner":"codions","description":"Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.","archived":false,"fork":false,"pushed_at":"2023-06-01T10:34:00.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T20:51:21.773Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-01T08:51:17.000Z","updated_at":"2025-02-02T02:21:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"36b063f5-3119-4c89-a1e8-3969e19cad95","html_url":"https://github.com/codions/laravel-modules-livewire","commit_stats":null,"previous_names":["codions/laravel-modules-livewire"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codions%2Flaravel-modules-livewire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codions%2Flaravel-modules-livewire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codions%2Flaravel-modules-livewire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codions%2Flaravel-modules-livewire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codions","download_url":"https://codeload.github.com/codions/laravel-modules-livewire/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245138106,"owners_count":20566869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-30T14:48:07.663Z","updated_at":"2026-04-15T15:45:09.362Z","avatar_url":"https://github.com/codions.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Modules With Livewire\n\nUsing [Laravel Livewire](https://github.com/livewire/livewire) in [Laravel Modules](https://github.com/nWidart/laravel-modules) package with automatically registered livewire components for every modules.\n\n\n\n### Installation:\n\nInstall through composer:\n\n```\ncomposer require codions/laravel-modules-livewire\n```\n\nPublish the package's configuration file:\n\n```\nphp artisan vendor:publish --tag=modules-livewire-config\n```\n\n### Making Components:\n\n**Command Signature:**\n\n`php artisan module:make-livewire \u003cComponent\u003e \u003cModule\u003e --view= --force --inline --stub= --custom`\n\n**Example:**\n\n```\nphp artisan module:make-livewire Pages/AboutPage Core\n```\n\n```\nphp artisan module:make-livewire Pages\\\\AboutPage Core\n```\n\n```\nphp artisan module:make-livewire pages.about-page Core\n```\n\n**Force create component if the class already exists:**\n\n```\nphp artisan module:make-livewire Pages/AboutPage Core --force\n```\n\n**Output:**\n\n```\nCOMPONENT CREATED\n\nCLASS: Modules/Core/Http/Livewire/Pages/AboutPage.php\nVIEW:  Modules/Core/Resources/views/livewire/pages/about-page.blade.php\nTAG: \u003clivewire:core::pages.about-page /\u003e\n```\n\n**Inline Component:**\n\n```\nphp artisan module:make-livewire Core Pages/AboutPage --inline\n```\n\n**Output:**\n\n```\nCOMPONENT CREATED\n\nCLASS: Modules/Core/Http/Livewire/Pages/AboutPage.php\nTAG: \u003clivewire:core::pages.about-page /\u003e\n```\n\n**Modifying Stubs:**\n\nPublish the package's stubs:\n\n```\nphp artisan vendor:publish --tag=modules-livewire-stub\n```\n\nAfter publishing the stubs, will create these files. And when running the make command, will use these stub files by default.\n\n```\nstubs/modules-livewire/livewire.inline.stub\nstubs/modules-livewire/livewire.stub\nstubs/modules-livewire/livewire.view.stub\n```\n\n**You're able to set a custom stub directory for component with (--stub) option.**\n\n```\nphp artisan module:make-livewire Core Pages/AboutPage --stub=about\n```\n\n```\nphp artisan module:make-livewire Core Pages/AboutPage --stub=modules-livewire/core\n```\n\n```\nphp artisan module:make-livewire Core Pages/AboutPage --stub=./\n```\n\n**Extra Option (--view):**\n\n**You're able to set a custom view path for component with (--view) option.**\n\n**Example:**\n\n```\nphp artisan module:make-livewire Pages/AboutPage Core --view=pages/about\n```\n\n```\nphp artisan module:make-livewire Pages/AboutPage Core --view=pages.about\n```\n\n**Output:**\n\n```\nCOMPONENT CREATED\n\nCLASS: Modules/Core/Http/Livewire/Pages/AboutPage.php\nVIEW:  Modules/Core/Resources/views/livewire/pages/about.blade.php\nTAG: \u003clivewire:core::pages.about-page /\u003e\n```\n### Rendering Components:\n\n`\u003clivewire:{module-lower-name}::component-class-kebab-case /\u003e`\n\n**Example:**\n\n```\n\u003clivewire:core::pages.about-page /\u003e\n```\n### Custom Module:\n\n**To create components for the custom module, should be add custom modules in the config file.**\n\nThe config file is located at `config/modules-livewire.php` after publishing the config file.\n\nRemove comment for these lines \u0026 add your custom modules.\n\n```\n    /*\n    |--------------------------------------------------------------------------\n    | Custom modules setup\n    |--------------------------------------------------------------------------\n    |\n    */\n\n    // 'custom_modules' =\u003e [\n    //     'Chat' =\u003e [\n    //         'path' =\u003e base_path('libraries/Chat'),\n    //         'module_namespace' =\u003e 'Libraries\\\\Chat',\n    //         // 'namespace' =\u003e 'Http\\\\Livewire',\n    //         // 'view' =\u003e 'Resources/views/livewire',\n    //         // 'name_lower' =\u003e 'chat',\n    //     ],\n    // ],\n```\n\n**Custom module config details**\n\n\u003e **path:** Add module full path (required).\n\u003e\n\u003e **module_namespace:** Add module namespace (required).\n\u003e\n\u003e **namespace:** By default using `config('modules-livewire.namespace')` value. You can set a different value for the specific module.\n\u003e\n\u003e **view:** By default using `config('modules-livewire.view')` value. You can set a different value for the specific module.\n\u003e\n\u003e **name_lower:** By default using module name to lowercase. If you set a custom name, module components will be register by custom name.\n\u003e\n\n\n## Credits\n- This project is a modified version of [mhmiton/laravel-modules-livewire](https://github.com/mhmiton/laravel-modules-livewire), created as a fork with additional changes.\n\n## License\nLaravel Themes Manager is open-sourced software licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodions%2Flaravel-modules-livewire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodions%2Flaravel-modules-livewire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodions%2Flaravel-modules-livewire/lists"}