A free open source IT asset/license management system
Added userpics from thispersondoesnotexist.com
snipe932c1364ee7b
diff --git a/database/seeders/AssetModelSeeder.php b/database/seeders/AssetModelSeeder.phpindex e8816cc509..0652fbfb84 100755--- a/database/seeders/AssetModelSeeder.php+++ b/database/seeders/AssetModelSeeder.php@@ -36,8 +36,8 @@ class AssetModelSeeder extends SeederAssetModel::factory()->count(1)->tab3Model()->create(); // 14// Phones- AssetModel::factory()->count(1)->iphone6sModel()->create(); // 15- AssetModel::factory()->count(1)->iphone7Model()->create(); // 16+ AssetModel::factory()->count(1)->iphone11Model()->create(); // 15+ AssetModel::factory()->count(1)->iphone12Model()->create(); // 16// DisplaysAssetModel::factory()->count(1)->ultrafine()->create(); // 17diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.phpindex c66f23265e..107e8a3372 100644--- a/database/seeders/UserSeeder.php+++ b/database/seeders/UserSeeder.php@@ -4,6 +4,8 @@ namespace Database\Seeders;use App\Models\User;use Illuminate\Database\Seeder;+use Illuminate\Support\Facades\Storage;+use Illuminate\Support\Facades\Log;class UserSeeder extends Seeder{@@ -20,5 +22,43 @@ class UserSeeder extends SeederUser::factory()->count(3)->superuser()->create();User::factory()->count(3)->admin()->create();User::factory()->count(50)->viewAssets()->create();++ $src = public_path('/img/demo/avatars/');+ $dst = 'avatars'.'/';+ $del_files = Storage::files($dst);++ foreach ($del_files as $del_file) { // iterate files+ $file_to_delete = str_replace($src, '', $del_file);+ Log::debug('Deleting: '.$file_to_delete);+ try {+ Storage::disk('public')->delete($dst.$del_file);+ } catch (\Exception $e) {+ Log::debug($e);+ }+ }++ $add_files = glob($src.'/*.*');+ foreach ($add_files as $add_file) {+ $file_to_copy = str_replace($src, '', $add_file);+ Log::debug('Copying: '.$file_to_copy);+ try {+ Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));+ } catch (\Exception $e) {+ Log::debug($e);+ }+ }++ $users = User::orderBy('id', 'desc')->take(20)->get();+ $file_number = 1;++ foreach ($users as $user) {++ $user->avatar = $file_number.'.jpg';+ $user->save();+ $file_number++;+ }+++}}diff --git a/public/img/demo/avatars/1.jpg b/public/img/demo/avatars/1.jpgnew file mode 100644index 0000000000..78c59a67d5Binary files /dev/null and b/public/img/demo/avatars/1.jpg differdiff --git a/public/img/demo/avatars/10.jpg b/public/img/demo/avatars/10.jpgnew file mode 100644index 0000000000..95150c433dBinary files /dev/null and b/public/img/demo/avatars/10.jpg differdiff --git a/public/img/demo/avatars/11.jpg b/public/img/demo/avatars/11.jpgnew file mode 100644index 0000000000..8aa9f82911Binary files /dev/null and b/public/img/demo/avatars/11.jpg differdiff --git a/public/img/demo/avatars/12.jpg b/public/img/demo/avatars/12.jpgnew file mode 100644index 0000000000..fc741d0fd0Binary files /dev/null and b/public/img/demo/avatars/12.jpg differdiff --git a/public/img/demo/avatars/13.jpg b/public/img/demo/avatars/13.jpgnew file mode 100644index 0000000000..bb3634c720Binary files /dev/null and b/public/img/demo/avatars/13.jpg differdiff --git a/public/img/demo/avatars/14.jpg b/public/img/demo/avatars/14.jpgnew file mode 100644index 0000000000..ee6f3bc702Binary files /dev/null and b/public/img/demo/avatars/14.jpg differdiff --git a/public/img/demo/avatars/15.jpg b/public/img/demo/avatars/15.jpgnew file mode 100644index 0000000000..e32542453aBinary files /dev/null and b/public/img/demo/avatars/15.jpg differdiff --git a/public/img/demo/avatars/16.jpg b/public/img/demo/avatars/16.jpgnew file mode 100644index 0000000000..ca16a1ac51Binary files /dev/null and b/public/img/demo/avatars/16.jpg differdiff --git a/public/img/demo/avatars/17.jpg b/public/img/demo/avatars/17.jpgnew file mode 100644index 0000000000..5e1589053cBinary files /dev/null and b/public/img/demo/avatars/17.jpg differdiff --git a/public/img/demo/avatars/18.jpg b/public/img/demo/avatars/18.jpgnew file mode 100644index 0000000000..34cd548539Binary files /dev/null and b/public/img/demo/avatars/18.jpg differdiff --git a/public/img/demo/avatars/19.jpg b/public/img/demo/avatars/19.jpgnew file mode 100644index 0000000000..0ad858b003Binary files /dev/null and b/public/img/demo/avatars/19.jpg differdiff --git a/public/img/demo/avatars/2.jpg b/public/img/demo/avatars/2.jpgnew file mode 100644index 0000000000..2e929c8540Binary files /dev/null and b/public/img/demo/avatars/2.jpg differdiff --git a/public/img/demo/avatars/20.jpg b/public/img/demo/avatars/20.jpgnew file mode 100644index 0000000000..81d90c7862Binary files /dev/null and b/public/img/demo/avatars/20.jpg differdiff --git a/public/img/demo/avatars/3.jpg b/public/img/demo/avatars/3.jpgnew file mode 100644index 0000000000..751b3dad8fBinary files /dev/null and b/public/img/demo/avatars/3.jpg differdiff --git a/public/img/demo/avatars/4.jpg b/public/img/demo/avatars/4.jpgnew file mode 100644index 0000000000..aab81c5592Binary files /dev/null and b/public/img/demo/avatars/4.jpg differdiff --git a/public/img/demo/avatars/5.jpg b/public/img/demo/avatars/5.jpgnew file mode 100644index 0000000000..118defa791Binary files /dev/null and b/public/img/demo/avatars/5.jpg differdiff --git a/public/img/demo/avatars/6.jpg b/public/img/demo/avatars/6.jpgnew file mode 100644index 0000000000..113a1d2692Binary files /dev/null and b/public/img/demo/avatars/6.jpg differdiff --git a/public/img/demo/avatars/7.jpg b/public/img/demo/avatars/7.jpgnew file mode 100644index 0000000000..1051532161Binary files /dev/null and b/public/img/demo/avatars/7.jpg differdiff --git a/public/img/demo/avatars/8.jpg b/public/img/demo/avatars/8.jpgnew file mode 100644index 0000000000..c9691ac944Binary files /dev/null and b/public/img/demo/avatars/8.jpg differdiff --git a/public/img/demo/avatars/9.jpg b/public/img/demo/avatars/9.jpgnew file mode 100644index 0000000000..544f7c907dBinary files /dev/null and b/public/img/demo/avatars/9.jpg differ