定制 playroom/livewire-adapter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

playroom/livewire-adapter

最新稳定版本:v1.0.1

Composer 安装命令:

composer require playroom/livewire-adapter

包简介

Livewire adapter package for PlayRoom built on the Alpine adapter

README 文档

README

Laravel package that exposes PlayRoom as a Livewire 4 component.

Requirements

  • PHP 8.3+
  • Laravel 13+
  • Livewire 4+

Installation

Require the package:

composer require playroom/livewire-adapter

Laravel package discovery will register PlayRoom\\LivewirePlayRoom\\LivewirePlayRoomServiceProvider automatically.

Add the package JavaScript entry to your application's vite.config.js inputs so Laravel Vite includes it in the manifest:

laravel({
    input: [
        'resources/css/app.css',
        'resources/js/app.js',
        'vendor/playroom/livewire-adapter/resources/js/playroom-init.js',
    ],
    refresh: true,
})

Usage

Render the component in Blade:

<livewire:play-room />

Or mount it directly with custom options:

@livewire(\PlayRoom\LivewirePlayRoom\LivewirePlayRoom::class, [
    'playRoomLocale' => 'en',
    'playRoomTheme' => 'light',
    'playRoomOptions' => [
        'browserStartMode' => 'inline',
        'launcher' => [
            'mode' => 'inline',
        ],
        'themeColors' => [
            'primary' => '#0f766e',
            'secondary' => '#475569',
        ],
    ],
    'playRoomUseDefaultGames' => true,
    'playRoomDefaultGamesConfig' => [],
    'playRoomGameRegistrars' => [],
])

Supported Props

  • playRoomLocale
  • playRoomTheme
  • playRoomOptions
  • playRoomWrapperClass
  • playRoomContainerClass
  • playRoomUseDefaultGames
  • playRoomDefaultGamesConfig
  • playRoomGameRegistrars

Notes

  • The package loads the vendor/playroom/livewire-adapter/resources/js/playroom-init.js Vite entry from the consuming Laravel app.
  • The consuming Laravel app must add that same path to the Vite input array, otherwise the asset will not exist in public/build/manifest.json.
  • This adapter expects the underlying PlayRoom Alpine integration to be available in the host application.
  • Locale and theme changes stay synchronized between the PlayRoom instance and Livewire.

统计信息

  • 总下载量: 38
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固