定制 olakunlevpn/laravel-installer-account 二次开发

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

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

olakunlevpn/laravel-installer-account

最新稳定版本:v1.1.0

Composer 安装命令:

composer require olakunlevpn/laravel-installer-account

包简介

Account setup and admin creation plugin for Laravel Installer

README 文档

README

Laravel Installer - Account Setup

Latest Version Total Downloads

This package adds admin account creation to Laravel Installer. It creates the first administrator user during the installation process.

To learn all about it, head over to the extensive documentation.

Here's what you can do:

// Configure default admin role
ACCOUNT_DEFAULT_ROLE=admin
ACCOUNT_STEP_POSITION=5

The package creates admin users:

// User fills in:
// - Name
// - Email
// - Password
// - Password confirmation

// Package stores in session until database ready
// After migrations, saves to users table

Works with your users table:

Schema::create('users', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->string('email')->unique();
    $table->string('password');
    $table->string('role')->default('user'); // Optional
    $table->timestamps();
});

Integrates with license verification:

// If license package installed
// Email auto-fills from license step
// Saves time for users

The account data is stored securely with bcrypt-hashed passwords.

Installation

You can install the package via composer:

composer require olakunlevpn/laravel-installer-account

Ensure your users migration has the required columns:

// Laravel's default migration already includes:
// - name, email, password

// Add role column if needed:
$table->string('role')->default('user');

Configure the default admin role:

ACCOUNT_DEFAULT_ROLE=admin
ACCOUNT_STEP_POSITION=5

That's it! The account setup step will appear in your installer.

You can find the full installation instructions in our documentation.

Usage

The package handles everything automatically:

  1. Displays account creation form
  2. Validates user input
  3. Stores data in session
  4. After migrations complete, saves to users table
  5. Hashes password with bcrypt
  6. Assigns configured role

Role Configuration

String role:

'default_role' => 'admin',
'role_column' => 'role',

Integer role_id:

'default_role' => 1,
'role_column' => 'role_id',

No role:

'default_role' => null,

Customization

Publish the configuration file:

php artisan vendor:publish --tag=laravel-installer-account-config

Publish views to customize the UI:

php artisan vendor:publish --tag=laravel-installer-account-views

Publish translations:

php artisan vendor:publish --tag=laravel-installer-account-translations

Learn more about customization in the documentation.

Changelog

Please see the main CHANGELOG for more information on what has changed recently.

License

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

统计信息

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

GitHub 信息

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

其他信息

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