定制 alisons/caller 二次开发

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

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

alisons/caller

Composer 安装命令:

composer require alisons/caller

包简介

A caller package to enhance a project with caller functionality

README 文档

README

Sure! Below is the complete README.md file that you can directly use for your project.

# Caller Package for Laravel

The **Caller** package integrates a caller feature into your Laravel application, providing an easy way to handle phone numbers with click-to-call functionality. Follow the steps below to install and configure the package.

---

## Table of Contents

- [Installation Instructions](#installation-instructions)
  - [1. Install the Required Package](#1-install-the-required-package)
  - [2. Publish Vendor Assets](#2-publish-vendor-assets)
  - [3. Run Migration](#3-run-migration)
  - [4. Update Views](#4-update-views)
- [Accessing the Caller Settings](#accessing-the-caller-settings)
- [Configuring the Caller in Your Application](#configuring-the-caller-in-your-application)
- [Conclusion](#conclusion)

---

## Installation Instructions

### 1. Install the Required Package

To install the Caller package, run the following command in your terminal:

```bash
composer require alisons/caller
```

2. Publish Vendor Assets

Next, publish the vendor assets with the following command:

php artisan vendor:publish

When prompted, select the option for Alisons\Caller\CallerServiceProvider.

3. Run Migration

Run the migration to install the necessary database table:

php artisan migrate

This will create the required tables in your database for the caller functionality.

4. Update Views

By default, the application uses Laravel Breeze's layouts->app as its layout. If you're using a different layout, you need to update the references:

  1. Navigate to vendor/alisons/caller/resources/views/layout/main.blade.php and change the layout reference to match your application layout.
  2. The package uses a section called caller-wrapper. In your layout file, add a @yield('caller-wrapper') where you want the caller section to appear.

5. Add Content Yeild

By default, the application uses Laravel Breeze's layouts->app as its layout. If you're using a different layout, you need to update the references:

@yield('caller-wrapper')

Accessing the Caller Settings

Once the package is installed, you can access the Caller settings at the following URL:

your-application-path/caller/caller

This is the page where you can configure the caller functionality for your application.

Configuring the Caller in Your Application

To enable the caller functionality, you need to include the JavaScript library on the page where you want to use it.

Add the Script

Add the following script to the <head> section of your layout file:

<script src="{{ asset('caller/js/caller.js') }}"></script>

This ensures that the JavaScript necessary for the caller functionality is loaded.

Add Phone Numbers

Next, place the phone number(s) using the following format within your view:

<a class="caller" data-number="{{ echo your number here }}"
  >{{ number field here }}</a
>

Ensure that the number is placed in the data-number attribute and the visible number is placed inside the anchor tag.

Conclusion

That's it! You've now successfully installed and configured the Caller package in your Laravel application. If you have any issues or questions, please feel free to open an issue on this repository.

We hope this package enhances your application with seamless caller functionality!

License

This package is licensed under the MIT License.


You can copy and paste this content directly into a `README.md` file in your project. It includes the installation instructions, configuration steps, and other relevant sections that would guide a developer through the process of integrating and using the Caller package in their Laravel application.

alisons/caller 适用场景与选型建议

alisons/caller 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 05 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 alisons/caller 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 alisons/caller 我们能提供哪些服务?
定制开发 / 二次开发

基于 alisons/caller 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-05-12