feature/RVRNEXT-24-use-slugs-for-communities #52
@ -1,9 +1,9 @@
 | 
				
			|||||||
<?php namespace RVR\PersistentData\Model;
 | 
					<?php namespace RVR\PersistentData\Model;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use DateTime;
 | 
					use DateTime;
 | 
				
			||||||
use SokoWeb\PersistentData\Model\Model;
 | 
					use SokoWeb\PersistentData\Model\ModelWithSlug;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Community extends Model
 | 
					class Community extends ModelWithSlug
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    protected static string $table = 'communities';
 | 
					    protected static string $table = 'communities';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -11,6 +11,8 @@ class Community extends Model
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    protected static array $relations = ['main_currency' => Currency::class];
 | 
					    protected static array $relations = ['main_currency' => Currency::class];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected static string $slugSource = 'name';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private string $name = '';
 | 
					    private string $name = '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private string $currency = '';
 | 
					    private string $currency = '';
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user