alisons/caller

There is no license information available for the latest version (3.0.0) of this package.

A caller package to enhance a project with caller functionality

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

3.0.0 2025-05-12 11:14 UTC

This package is auto-updated.

Last update: 2025-06-12 11:27:01 UTC


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.