定制 mikeybelike/intl-tel-input-backpack 二次开发

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

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

mikeybelike/intl-tel-input-backpack

最新稳定版本:0.3.0

Composer 安装命令:

composer require mikeybelike/intl-tel-input-backpack

包简介

A backpack field package for formatting and inputting international telephone numbers

README 文档

README

Latest Version on Packagist Total Downloads The Whole Fruit Manifesto

This package provides you the ability to enter and validate international telephone numbers for projects that use the Backpack for Laravel administration panel.

More exactly, it adds the intl-tel-input plugin to your Backpack CRUD interfaces as a field so you can easily input valid interational telephone numbers.

Screenshots

Backpack Intl Tel Input Addon

Installation

Via Composer

composer require mikeybelike/intl-tel-input-backpack

Usage

To use the field this package provides, inside your custom CrudController do:

$this->crud->addField([
    'name' => 'contact_number',
    'label' => 'Contact Number',
    'type' => 'intl-tel-input',
    'view_namespace' => 'mikeybelike.intl-tel-input-backpack::fields',

    // additional optional configuration supported
    'options' => [
        'initialCountry' => 'gb'
    ]
]);

Notice the view_namespace attribute - make sure that is exactly as above, to tell Backpack to load the field from this addon package, instead of assuming it's inside the Backpack\CRUD package.

Overwriting

If you need to change the field in any way, you can easily publish the file to your app, and modify that file any way you want. But please keep in mind that you will not be getting any updates.

Step 1. Copy-paste the blade file to your directory:

# create the fields directory if it's not already there
mkdir -p resources/views/vendor/backpack/crud/fields

# copy the blade file inside the folder we created above
cp -i vendor/mikeybelike/intl-tel-input-backpack/src/resources/views/fields/field_name.blade.php resources/views/vendor/backpack/crud/fields/field_name.blade.php

Step 2. Remove the vendor namespace wherever you've used the field:

$this->crud->addField([
    'name' => 'contact_number',
    'type' => 'intl-tel-input',
    'label' => 'Contact Number',
-   'view_namespace' => 'mikeybelike.intl-tel-input-backpack::fields'
]);

Step 3. Uninstall this package. Since it only provides one file, and you're no longer using that file, it makes no sense to have the package installed:

composer remove mikeybelike/intl-tel-input-backpack

Change log

Changes are documented here on Github. Please see the Releases tab.

Testing

composer test

Contributing

Please see contributing.md for a todolist and howtos.

Security

If you discover any security related issues, please email hi@mikey.dev instead of using the issue tracker.

Credits

License

This project was released under MIT, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.

However, please note that you do need Backpack installed, so you need to also abide by its YUMMY License. That means in production you'll need a Backpack license code. You can get a free one for non-commercial use (or a paid one for commercial use) on backpackforlaravel.com.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固