diff --git a/database/factories/AdminUserFactory.php b/database/factories/AdminUserFactory.php index 2aa2162f..dc635c60 100644 --- a/database/factories/AdminUserFactory.php +++ b/database/factories/AdminUserFactory.php @@ -30,8 +30,7 @@ public function definition() 'email' => $this->faker->email, 'password' => Hash::make('secret'), 'role_id' => $role->id, - 'is_super_admin' => rand(0, 1), - 'image_path' => null, + 'is_super_admin' => rand(0, 1) ]; } } diff --git a/resources/views/user/staff/_fields.blade.php b/resources/views/user/staff/_fields.blade.php index b3eb06c9..6c364fc5 100644 --- a/resources/views/user/staff/_fields.blade.php +++ b/resources/views/user/staff/_fields.blade.php @@ -41,7 +41,7 @@ <div class="mt-3"> <x-avored::form.upload name="image_path" - value="{{ (isset($staff) && $staff->imagePath->url) ? $staff->imagePath->url : '' }}" + value="{{ (isset($staff) && isset($staff->imagePath) && $staff->imagePath->url) ? $staff->imagePath->url : '' }}" label="{{ __('avored::system.image_path') }}" ></x-avored::form.upload> </div>