ascsoftw/livewire-offline
Composer 安装命令:
composer require ascsoftw/livewire-offline
包简介
Livewire Package to display Warning to User when they go Offline.
README 文档
README
Livewire Package to display Warning to User when they go Offline.
Requirements
Make sure that Livewire is installed properly on your project.
Installation
You can install the Package using Composer
composer require ascsoftw/livewire-offline
Usage
Put Livewire-component @livewire('offline') into your app layout.
Make sure to insert it into correct context because it will be positioned absolutely.
Configurations
If you want to override the configurations, you must publish the assets using below command
php artisan vendor:publish --tag=config
This will publish the configuration file at config/livewire-offline.php. You can specify the following configurations
return [ 'offline_text' => 'You are currenly Offline!', 'use_tailwind' => true, //Specify Inline Styles if use_tailwind is set to false 'background_color' => '#9ACD32', //if you specify hex code, prefix with # 'text_color' => '#FF0000', //Specify TailwindCss Classes if use_tailwind is set to true 'text_class' => 'text-red-600', 'background_class' => 'bg-yellow-300', ];
You can also publish the View using below command
php artisan vendor:publish --tag=views
This will publish the Views in resources/views/vendor/livewire-offline directory which you can then customize.
Troubleshooting
Your messages don't get styles while using TailwindCss? Please publish your view. Therefore Laravel Mix compiler will find package related views and will purge CSS accordingly.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Credits
License
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-19