I have an activity menu that have three sub-menu. These sub-menu are common to activity but have different table. So I want to use these three table under one model class, how can I do save operation individual to each other?
My code is as follows:
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use DB;
class Activity extends Model {
protected $table1 = 'task_management';
protected $table2 = 'call_management';
protected $table3 = 'event_management';
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire