mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-31 13:41:09 -04:00 
			
		
		
		
	Helper for custom field to get by slug
This commit is contained in:
		| @ -42,4 +42,11 @@ trait HasCustomFieldsTrait | ||||
|             $customFieldValue->save(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     public function getCustomFieldValues($slug) | ||||
|     { | ||||
|         return $this->fields()->whereHas('customField', function ($query) use ($slug) { | ||||
|             $query->where('slug', $slug); | ||||
|         })->first(); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user