public static function getUserFullNameByID($userID) { $strUserFullName = ""; $adminUser = AdminUser::withTrashed()->findOrFail($userID); if ($adminUser) { $strUserFullName = $adminUser->full_name; } return $strUserFullName; }
public function run() { DB::table('admin_user')->delete(); AdminUser::create(array('dom_id' => '1', 'code' => '', 'role_id' => '', 'role_type' => '', 'user_name' => 'khanhth', 'password' => Hash::make('123'), 'remember_token' => '', 'full_name' => 'To Hung Khanh', 'sex' => '1', 'birthday' => '', 'manager_id' => '', 'manager_email' => '', 'last_visit_Date' => '', 'profile_image' => '', 'status' => '1', 'theme' => 'Default', 'language' => 'en-US', 'date_format_string' => 'ddMMyyyy', 'date_format_code' => '', 'sitemap' => '', 'address' => '', 'city' => '', 'country' => '', 'mobile' => '', 'office_phone' => '', 'office_etc' => '', 'other_phone' => '', 'fax' => '', 'email' => '', 'note' => '', 'more_info' => '', 'owner_user' => '1', 'created_user' => '1', 'updated_user' => '1', 'updated_ui_id' => '1')); }