承接 ert3e/laravel-phone-auth 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ert3e/laravel-phone-auth

Composer 安装命令:

composer require ert3e/laravel-phone-auth

包简介

Laravel+livewire phone auth module

README 文档

README

https://youtu.be/UaYx2VgXMEY

Important

  • Need laravel livewire package
  • The default template uses tailwind classes (customize it if you want)

Install

  • install livewire

  • install doctrine/dbal

  • composer require lee-to/laravel-phone-auth

  • php artisan vendor:publish --provider="Ert3e\PhoneAuth\Providers\PhoneAuthServiceProvider"

  • configure config/phone_auth.php

Usage

User Model

  • Add PhoneVerification Trait to User Model
use PhoneVerification;
  • Add phone cast to User Model
protected $casts = [
    'phone' => PhoneCast::class
];

Blade component

Auth/Phone verification form

  • Simple
@livewire('phone-verification')
  • Without form wrap
@livewire('phone-verification', ['formWrap' => false])
  • Register new or login if phone verified and exist
@livewire('phone-verification', ['loginAndRegister' => true])

Check phone confirmed

\Ert3e\PhoneAuth\Models\ConfirmedPhone::confirmed($phone, $user_id = null);

Components properties (override config)

  • stopEvents (bool) = turn off emitBefore, emitAfter
  • customRedirectTo (bool|array) = redirect after success
  • emptyCustomFields (bool) = disable custom fields
  • customParams (array) = send custom properties to view
<livewire:phone-verification
    :stopEvents="true"
    :customRedirectTo="'/'"
    :emptyCustomFields="true"
    :customParams="['btn' => 'Login', 'title' => 'Login']"
    :formWrap="false"
    :loginAndRegister="true"
/>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固