/** * @test **/ public function canShowAllCustomFieldsType() { $this->stopPermissionCheckEvent(); $profile_type = ProfileFieldType::create(["description" => "invoice number"]); $profile_types = $this->custom_profile_1->getAllTypes(); $this->objectHasAllArrayAttributes($profile_type->toArray(), $profile_types->first()); }
public static function deleteType($id) { Event::fire('customprofile.deleting'); $success = ProfileFieldType::findOrFail($id)->delete(); return $success; }