承接 skulich/laravel-user-token-management-cli 相关项目开发

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

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

skulich/laravel-user-token-management-cli

最新稳定版本:1.2.0

Composer 安装命令:

composer require skulich/laravel-user-token-management-cli

包简介

A Laravel package that allows managing Users and their Tokens from CLI

README 文档

README

Latest Version on Packagist PHP Version Require Laravel Version Run Tests Code Coverage License Total Downloads

A Laravel package that lets you create and delete users and tokens from the CLI.

This can be useful for API microservices where only one user is needed to access the API.

Note: User token commands are available only when Sanctum is installed and the User model is tokenable.

Note: This package provides only basic token support. It does not support abilities, expiration, etc.

Table of contents

Installation

Install the package via Composer.

composer require skulich/laravel-user-token-management-cli

Usage

The package provides six Artisan commands to manage users and their tokens.

User Commands

Run these Artisan commands to manage users.

# create a new user
php artisan user:create

# delete a user
php artisan user:delete

# list users
php artisan user:list

User Token Commands

Run these Artisan commands to manage user tokens.

# create a new token for the user
php artisan user:token:create

# delete tokens for the user
php artisan user:token:delete

# list user tokens
php artisan user:token:list

User Model Binding

If your User model class is not located in the App\Models\User namespace, you must bind App\Models\User to your implementation in the boot() method of AppServiceProvider.

namespace App\Providers;

class AppServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        app()->bind('\App\Models\User', fn () => resolve('\App\User'));
    }
}

Tests

Run the entire test suite:

composer test

Changelog

Please see CHANGELOG for more information.

Contributing

Please see CONTRIBUTING for more information.

License

The MIT License (MIT). Please see LICENSE for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固