mirror of
				https://github.com/cp6/my-idlers.git
				synced 2025-11-03 23:59:09 +00:00 
			
		
		
		
	Huge update for Server to use relationships (no more joins) Created LabelsAssigned class for the labels relationship Removed pricingForService() function Removed now unused server cache forgets
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			420 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			420 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Models;
 | 
						|
 | 
						|
use Illuminate\Database\Eloquent\Factories\HasFactory;
 | 
						|
use Illuminate\Database\Eloquent\Model;
 | 
						|
 | 
						|
class LabelsAssigned extends Model
 | 
						|
{
 | 
						|
    use HasFactory;
 | 
						|
 | 
						|
    public $incrementing = false;
 | 
						|
 | 
						|
    public $table = 'labels_assigned';
 | 
						|
 | 
						|
    protected $fillable = ['label_id', 'service_id'];
 | 
						|
 | 
						|
    public function label()
 | 
						|
    {
 | 
						|
        return $this->hasOne(Labels::class, 'id', 'label_id');
 | 
						|
    }
 | 
						|
 | 
						|
}
 |