mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Ability to skip deleting/generating new users
This will behave unpredictably if there is not a user id 1
This commit is contained in:
parent
fbea1c0823
commit
064a4ebe33
|
@ -37,7 +37,7 @@ class DemoData extends Command
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'snipeit:demo-seed {--username=*}';
|
protected $signature = 'snipeit:demo-seed {--nukeusers}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
|
@ -74,23 +74,6 @@ class DemoData extends Command
|
||||||
|
|
||||||
if ($this->confirm("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n This will overwrite your existing database. Do you wish to continue?")) {
|
if ($this->confirm("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n This will overwrite your existing database. Do you wish to continue?")) {
|
||||||
|
|
||||||
|
|
||||||
$this->dropRealCustomFieldsColumns();
|
|
||||||
$this->dropAndCreateCategories();
|
|
||||||
$this->dropAndCreateManufacturers();
|
|
||||||
$this->dropAndCreateLocations();
|
|
||||||
$this->dropAndCreateActionlogs();
|
|
||||||
$this->dropAndCreateAssetModels();
|
|
||||||
$this->dropAndCreateStatusLabels();
|
|
||||||
$this->dropAndCreateAssets();
|
|
||||||
$this->dropAndCreateDepreciations();
|
|
||||||
$this->dropAndCreateSuppliers();
|
|
||||||
$this->dropAndCreateAccessories();
|
|
||||||
$this->dropAndCreateLicenses();
|
|
||||||
$this->dropAndCreateComponents();
|
|
||||||
$this->dropAndCreateConsumables();
|
|
||||||
|
|
||||||
|
|
||||||
Import::truncate();
|
Import::truncate();
|
||||||
AssetMaintenance::truncate();
|
AssetMaintenance::truncate();
|
||||||
Group::truncate();
|
Group::truncate();
|
||||||
|
@ -98,13 +81,31 @@ class DemoData extends Command
|
||||||
CustomField::truncate();
|
CustomField::truncate();
|
||||||
Group::truncate();
|
Group::truncate();
|
||||||
CustomFieldset::truncate();
|
CustomFieldset::truncate();
|
||||||
Department::truncate();
|
|
||||||
User::where('username', '!=', 'snipe')
|
|
||||||
->where('username', '!=', 'admin')
|
|
||||||
->forceDelete();
|
|
||||||
DB::table('custom_field_custom_fieldset')->truncate();
|
DB::table('custom_field_custom_fieldset')->truncate();
|
||||||
DB::table('checkout_requests')->truncate();
|
DB::table('checkout_requests')->truncate();
|
||||||
|
|
||||||
|
$this->dropRealCustomFieldsColumns();
|
||||||
|
$this->dropAndCreateCategories();
|
||||||
|
$this->dropAndCreateManufacturers();
|
||||||
|
$this->dropAndCreateAssetModels();
|
||||||
|
$this->dropAndCreateStatusLabels();
|
||||||
|
$this->dropAndCreateDepreciations();
|
||||||
|
$this->dropAndCreateSuppliers();
|
||||||
|
$this->dropAndCreateAccessories();
|
||||||
|
$this->dropAndCreateLicenses();
|
||||||
|
$this->dropAndCreateComponents();
|
||||||
|
$this->dropAndCreateConsumables();
|
||||||
|
$this->dropAndCreateLocations();
|
||||||
|
if ($this->option('nukeusers')) {
|
||||||
|
$this->dropAndCreateUsers();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->dropAndCreateAssets();
|
||||||
|
$this->dropAndCreateActionlogs();
|
||||||
|
$this->dropAndCreateDepartments();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,6 +290,81 @@ class DemoData extends Command
|
||||||
'serial' => self::generateRandomString(),
|
'serial' => self::generateRandomString(),
|
||||||
'asset_tag' => '1000311'
|
'asset_tag' => '1000311'
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'id' => 12,
|
||||||
|
'user_id' => 1,
|
||||||
|
'name' => null,
|
||||||
|
'model_id' => 14,
|
||||||
|
'assigned_to' => null,
|
||||||
|
'assigned_type' => null,
|
||||||
|
'purchase_cost' => '899.56',
|
||||||
|
'purchase_date' => date('Y-m-d'),
|
||||||
|
'supplier_id' => rand(1,4),
|
||||||
|
'status_id' => 1,
|
||||||
|
'rtd_location_id' => rand(1,4),
|
||||||
|
'serial' => self::generateRandomString(),
|
||||||
|
'asset_tag' => '1000312'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 13,
|
||||||
|
'user_id' => 1,
|
||||||
|
'name' => null,
|
||||||
|
'model_id' => 14,
|
||||||
|
'assigned_to' => null,
|
||||||
|
'assigned_type' => null,
|
||||||
|
'purchase_cost' => '899.56',
|
||||||
|
'purchase_date' => date('Y-m-d'),
|
||||||
|
'supplier_id' => rand(1,4),
|
||||||
|
'status_id' => 1,
|
||||||
|
'rtd_location_id' => rand(1,4),
|
||||||
|
'serial' => self::generateRandomString(),
|
||||||
|
'asset_tag' => '1000313'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 14,
|
||||||
|
'user_id' => 1,
|
||||||
|
'name' => null,
|
||||||
|
'model_id' => 14,
|
||||||
|
'assigned_to' => null,
|
||||||
|
'assigned_type' => null,
|
||||||
|
'purchase_cost' => '899.56',
|
||||||
|
'purchase_date' => date('Y-m-d'),
|
||||||
|
'supplier_id' => rand(1,4),
|
||||||
|
'status_id' => 4,
|
||||||
|
'rtd_location_id' => rand(1,4),
|
||||||
|
'serial' => self::generateRandomString(),
|
||||||
|
'asset_tag' => '1000314'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 15,
|
||||||
|
'user_id' => 1,
|
||||||
|
'name' => 'Reception Laptop',
|
||||||
|
'model_id' => 4,
|
||||||
|
'assigned_to' => 3,
|
||||||
|
'assigned_type' => Location::class,
|
||||||
|
'purchase_cost' => '3025.56',
|
||||||
|
'purchase_date' => date('Y-m-d'),
|
||||||
|
'supplier_id' => rand(1,4),
|
||||||
|
'status_id' => 1,
|
||||||
|
'rtd_location_id' => rand(1,4),
|
||||||
|
'serial' => self::generateRandomString(),
|
||||||
|
'asset_tag' => '1000315'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 16,
|
||||||
|
'user_id' => 1,
|
||||||
|
'name' => 'Testing Laptop',
|
||||||
|
'model_id' => 4,
|
||||||
|
'assigned_to' => 2,
|
||||||
|
'assigned_type' => User::class,
|
||||||
|
'purchase_cost' => '3025.56',
|
||||||
|
'purchase_date' => date('Y-m-d'),
|
||||||
|
'supplier_id' => rand(1,4),
|
||||||
|
'status_id' => 1,
|
||||||
|
'rtd_location_id' => rand(1,4),
|
||||||
|
'serial' => self::generateRandomString(),
|
||||||
|
'asset_tag' => '1000316'
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -362,7 +438,7 @@ class DemoData extends Command
|
||||||
|
|
||||||
|
|
||||||
public function dropAndCreateSuppliers() {
|
public function dropAndCreateSuppliers() {
|
||||||
|
$this->info('Dropping suppliers data');
|
||||||
Supplier::truncate();
|
Supplier::truncate();
|
||||||
|
|
||||||
$supppliers = [
|
$supppliers = [
|
||||||
|
@ -390,12 +466,13 @@ class DemoData extends Command
|
||||||
|
|
||||||
// Create Depreciations
|
// Create Depreciations
|
||||||
DB::table('suppliers')->insert($supppliers);
|
DB::table('suppliers')->insert($supppliers);
|
||||||
|
$this->info('Generating suppliers data');
|
||||||
return $supppliers;
|
return $supppliers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function dropAndCreateDepreciations() {
|
public function dropAndCreateDepreciations() {
|
||||||
|
$this->info('Dropping depreciations data');
|
||||||
Depreciation::truncate();
|
Depreciation::truncate();
|
||||||
|
|
||||||
$depreciations = [
|
$depreciations = [
|
||||||
|
@ -414,13 +491,15 @@ class DemoData extends Command
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create Depreciations
|
// Create Depreciations
|
||||||
|
$this->info('Generating suppliers data');
|
||||||
DB::table('depreciations')->insert($depreciations);
|
DB::table('depreciations')->insert($depreciations);
|
||||||
|
|
||||||
return $depreciations;
|
return $depreciations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function dropAndCreateAssetModels() {
|
public function dropAndCreateAssetModels() {
|
||||||
|
$this->info('Dropping asset model data');
|
||||||
AssetModel::truncate();
|
AssetModel::truncate();
|
||||||
|
|
||||||
$models = [
|
$models = [
|
||||||
|
@ -582,14 +661,17 @@ class DemoData extends Command
|
||||||
'model_number' => rand(111111,99999)
|
'model_number' => rand(111111,99999)
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create Models
|
// Create Models
|
||||||
|
$this->info('generating asset model data');
|
||||||
DB::table('models')->insert($models);
|
DB::table('models')->insert($models);
|
||||||
return $models;
|
return $models;
|
||||||
}
|
}
|
||||||
public function dropAndCreateCategories() {
|
public function dropAndCreateCategories() {
|
||||||
|
|
||||||
|
$this->info('Dropping category data');
|
||||||
Category::truncate();
|
Category::truncate();
|
||||||
$categories = [
|
$categories = [
|
||||||
|
|
||||||
|
@ -686,12 +768,14 @@ class DemoData extends Command
|
||||||
|
|
||||||
|
|
||||||
// Create Categories
|
// Create Categories
|
||||||
|
$this->info('Generating category data');
|
||||||
DB::table('categories')->insert($categories);
|
DB::table('categories')->insert($categories);
|
||||||
return $categories;
|
return $categories;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dropAndCreateLocations() {
|
public function dropAndCreateLocations() {
|
||||||
|
|
||||||
|
$this->info('Dropping location data');
|
||||||
Location::truncate();
|
Location::truncate();
|
||||||
|
|
||||||
$locations = [
|
$locations = [
|
||||||
|
@ -720,6 +804,7 @@ class DemoData extends Command
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create Locations
|
// Create Locations
|
||||||
|
$this->info('Generating location data');
|
||||||
DB::table('locations')->insert($locations);
|
DB::table('locations')->insert($locations);
|
||||||
return $locations;
|
return $locations;
|
||||||
|
|
||||||
|
@ -727,6 +812,7 @@ class DemoData extends Command
|
||||||
|
|
||||||
public function dropAndCreateLicenses() {
|
public function dropAndCreateLicenses() {
|
||||||
|
|
||||||
|
$this->info('Dropping licenses and seat data');
|
||||||
License::truncate();
|
License::truncate();
|
||||||
LicenseSeat::truncate();
|
LicenseSeat::truncate();
|
||||||
|
|
||||||
|
@ -789,6 +875,7 @@ class DemoData extends Command
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create Licenses
|
// Create Licenses
|
||||||
|
$this->info('Dropping license and seat data');
|
||||||
DB::table('licenses')->insert($licenses);
|
DB::table('licenses')->insert($licenses);
|
||||||
|
|
||||||
foreach ($licenses as $license) {
|
foreach ($licenses as $license) {
|
||||||
|
@ -811,6 +898,7 @@ class DemoData extends Command
|
||||||
|
|
||||||
public function dropAndCreateAccessories() {
|
public function dropAndCreateAccessories() {
|
||||||
|
|
||||||
|
$this->info('Dropping accessory data');
|
||||||
Accessory::truncate();
|
Accessory::truncate();
|
||||||
DB::table('accessories_users')->truncate();
|
DB::table('accessories_users')->truncate();
|
||||||
|
|
||||||
|
@ -869,6 +957,7 @@ class DemoData extends Command
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create Locations
|
// Create Locations
|
||||||
|
$this->info('Generating accessory data');
|
||||||
DB::table('accessories')->insert($accessories);
|
DB::table('accessories')->insert($accessories);
|
||||||
return $accessories;
|
return $accessories;
|
||||||
|
|
||||||
|
@ -878,6 +967,7 @@ class DemoData extends Command
|
||||||
|
|
||||||
public function dropAndCreateComponents() {
|
public function dropAndCreateComponents() {
|
||||||
|
|
||||||
|
$this->info('Dropping component data');
|
||||||
Component::truncate();
|
Component::truncate();
|
||||||
DB::table('components_assets')->truncate();
|
DB::table('components_assets')->truncate();
|
||||||
|
|
||||||
|
@ -898,6 +988,7 @@ class DemoData extends Command
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create Locations
|
// Create Locations
|
||||||
|
$this->info('Generating component data');
|
||||||
DB::table('components')->insert($components);
|
DB::table('components')->insert($components);
|
||||||
return $components;
|
return $components;
|
||||||
|
|
||||||
|
@ -906,6 +997,7 @@ class DemoData extends Command
|
||||||
|
|
||||||
public function dropAndCreateConsumables() {
|
public function dropAndCreateConsumables() {
|
||||||
|
|
||||||
|
$this->info('Dropping consumable data');
|
||||||
Consumable::truncate();
|
Consumable::truncate();
|
||||||
DB::table('consumables_users')->truncate();
|
DB::table('consumables_users')->truncate();
|
||||||
|
|
||||||
|
@ -927,16 +1019,139 @@ class DemoData extends Command
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create Locations
|
// Create Locations
|
||||||
|
$this->info('Generating consumable data');
|
||||||
DB::table('consumables')->insert($consumables);
|
DB::table('consumables')->insert($consumables);
|
||||||
return $consumables;
|
return $consumables;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function dropAndCreateUsers() {
|
||||||
|
|
||||||
|
$this->info('Dropping users data (except user: admin)');
|
||||||
|
User::where('username', '!=', 'snipe')
|
||||||
|
->where('username', '!=', 'admin')
|
||||||
|
->forceDelete();
|
||||||
|
|
||||||
|
$users = [
|
||||||
|
|
||||||
|
// Users
|
||||||
|
[
|
||||||
|
'first_name' => 'Test',
|
||||||
|
'last_name' => 'User',
|
||||||
|
'username' => 'testuser',
|
||||||
|
'email' => 'testuser@snipe.net',
|
||||||
|
'jobtitle' => 'Just a test user',
|
||||||
|
'notes' => 'Created by demo seeder',
|
||||||
|
'location_id' => 1,
|
||||||
|
'department_id' => 1,
|
||||||
|
'password' => bcrypt('password'),
|
||||||
|
'activated' => 1,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'first_name' => 'Donald',
|
||||||
|
'last_name' => 'Duck',
|
||||||
|
'username' => 'donaldduck',
|
||||||
|
'email' => 'donaldduck@example.com',
|
||||||
|
'jobtitle' => 'Director of Engineering',
|
||||||
|
'notes' => 'Created by demo seeder',
|
||||||
|
'location_id' => 2,
|
||||||
|
'department_id' => 3,
|
||||||
|
'password' => bcrypt('password'),
|
||||||
|
'activated' => 1,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'first_name' => 'Adrian',
|
||||||
|
'last_name' => 'Whapcaplet',
|
||||||
|
'username' => 'adrianwhapcaplet',
|
||||||
|
'email' => 'adrianwhapcaplet@example.com',
|
||||||
|
'jobtitle' => 'HR Manager',
|
||||||
|
'notes' => 'Created by demo seeder',
|
||||||
|
'location_id' => 2,
|
||||||
|
'department_id' => 1,
|
||||||
|
'password' => bcrypt('password'),
|
||||||
|
'activated' => 1,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'first_name' => 'Arthur',
|
||||||
|
'last_name' => 'Nudge',
|
||||||
|
'username' => 'arthurnudge',
|
||||||
|
'email' => 'arthurnudge@example.com',
|
||||||
|
'jobtitle' => 'Social Media Manager',
|
||||||
|
'notes' => 'Created by demo seeder',
|
||||||
|
'location_id' => 2,
|
||||||
|
'department_id' => 2,
|
||||||
|
'password' => bcrypt('password'),
|
||||||
|
'activated' => 1,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'first_name' => 'Spiny',
|
||||||
|
'last_name' => 'Norman',
|
||||||
|
'username' => 'spinynorman',
|
||||||
|
'email' => 'spinynorman@example.com',
|
||||||
|
'jobtitle' => 'CEO',
|
||||||
|
'notes' => 'Created by demo seeder',
|
||||||
|
'location_id' => 2,
|
||||||
|
'department_id' => 2,
|
||||||
|
'password' => bcrypt('password'),
|
||||||
|
'activated' => 1,
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
// Create Locations
|
||||||
|
$this->info('Generating user data');
|
||||||
|
DB::table('users')->insert($users);
|
||||||
|
return $users;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dropAndCreateDepartments() {
|
||||||
|
|
||||||
|
$this->info('Dropping department data');
|
||||||
|
Department::truncate();
|
||||||
|
|
||||||
|
$departments = [
|
||||||
|
|
||||||
|
// Departments
|
||||||
|
[
|
||||||
|
'id' => 1,
|
||||||
|
'name' => 'Human Resources',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 2,
|
||||||
|
'name' => 'Dept of Silly Walks',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 3,
|
||||||
|
'name' => 'Engineering',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 4,
|
||||||
|
'name' => 'Marketing',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 5,
|
||||||
|
'name' => 'Client Services',
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
// Create Locations
|
||||||
|
$this->info('Generating suppliers data');
|
||||||
|
DB::table('departments')->insert($departments);
|
||||||
|
return $departments;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function dropAndCreateActionlogs() {
|
public function dropAndCreateActionlogs() {
|
||||||
|
|
||||||
|
$this->info('Dropping actionlog data');
|
||||||
Actionlog::truncate();
|
Actionlog::truncate();
|
||||||
|
|
||||||
|
|
||||||
$action_logs = [
|
$action_logs = [
|
||||||
|
|
||||||
// Action logs
|
// Action logs
|
||||||
|
@ -1010,16 +1225,38 @@ class DemoData extends Command
|
||||||
'created_at' => date('Y-m-d'),
|
'created_at' => date('Y-m-d'),
|
||||||
'note' => 'Created by demo seeder',
|
'note' => 'Created by demo seeder',
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'user_id' => 1,
|
||||||
|
'action_type' => 'checkout',
|
||||||
|
'target_id' => 3,
|
||||||
|
'target_type' => Location::class,
|
||||||
|
'item_type' => Asset::class,
|
||||||
|
'item_id' => 15,
|
||||||
|
'created_at' => date('Y-m-d'),
|
||||||
|
'note' => 'Created by demo seeder',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'user_id' => 1,
|
||||||
|
'action_type' => 'checkout',
|
||||||
|
'target_id' => 1,
|
||||||
|
'target_type' => User::class,
|
||||||
|
'item_type' => Asset::class,
|
||||||
|
'item_id' => 16,
|
||||||
|
'created_at' => date('Y-m-d'),
|
||||||
|
'note' => 'Created by demo seeder',
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create Logs
|
// Create Logs
|
||||||
|
$this->info('Generating actionlog data');
|
||||||
DB::table('action_logs')->insert($action_logs);
|
DB::table('action_logs')->insert($action_logs);
|
||||||
return $action_logs;
|
return $action_logs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dropAndCreateStatusLabels() {
|
public function dropAndCreateStatusLabels() {
|
||||||
|
|
||||||
|
$this->info('Dropping statuslabel data');
|
||||||
Statuslabel::truncate();
|
Statuslabel::truncate();
|
||||||
|
|
||||||
$statuslabels = [
|
$statuslabels = [
|
||||||
|
@ -1076,23 +1313,30 @@ class DemoData extends Command
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create status labels
|
// Create status labels
|
||||||
|
$this->info('Dropping statuslabel data');
|
||||||
DB::table('status_labels')->insert($statuslabels);
|
DB::table('status_labels')->insert($statuslabels);
|
||||||
return $statuslabels;
|
return $statuslabels;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dropRealCustomFieldsColumns() {
|
public function dropRealCustomFieldsColumns() {
|
||||||
// delete custom field columns on the asset table
|
// delete custom field columns on the asset table
|
||||||
|
$this->info('Dropping custom fields from asset table');
|
||||||
$fields = Customfield::all();
|
$fields = Customfield::all();
|
||||||
|
$fieldcount = 0;
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
if ($field->db_column!='') {
|
if ($field->db_column!='') {
|
||||||
|
$fieldcount++;
|
||||||
$this->info('Dropping DB column: '.$field->db_column);
|
$this->info('Dropping DB column: '.$field->db_column);
|
||||||
Schema::table('assets', function (Blueprint $table) {
|
Schema::table('assets', function (Blueprint $table) {
|
||||||
$table->dropColumn($field->db_column);
|
$table->dropColumn($field->db_column);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$this->info('Dropped '.$fieldcount.' fields from asset table');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function generateRandomString($length = 10) {
|
public function generateRandomString($length = 10) {
|
||||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||||
$charactersLength = strlen($characters);
|
$charactersLength = strlen($characters);
|
||||||
|
|
Loading…
Reference in a new issue