Laravel 11, Vuexy Admin 10.3, by admin@koneko.mx
This commit is contained in:
		
							
								
								
									
										35
									
								
								modules/Admin/App/Models/ContactableItem.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								modules/Admin/App/Models/ContactableItem.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,35 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Modules\Admin\App\Models;
 | 
			
		||||
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
 | 
			
		||||
class ContactableItem extends Model
 | 
			
		||||
{
 | 
			
		||||
    protected $table = 'contactable_items';
 | 
			
		||||
 | 
			
		||||
    protected $fillable = [
 | 
			
		||||
        'contactable_id',
 | 
			
		||||
        'contactable_type',
 | 
			
		||||
        'type',
 | 
			
		||||
        'data_contact',
 | 
			
		||||
        'is_preferred',
 | 
			
		||||
        'preference_level',
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Casts for the model attributes.
 | 
			
		||||
     */
 | 
			
		||||
    protected $casts = [
 | 
			
		||||
        'is_preferred' => 'boolean',
 | 
			
		||||
        'preference_level' => 'integer',
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Polymorphic relationship to the parent model.
 | 
			
		||||
     */
 | 
			
		||||
    public function contactable()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->morphTo();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user