belongsToMany('App\Models\User', 'user_permissions', 'permission_id', 'user_id'); } public function find(mixed $permission_id) { return $this->where('permission_id', $permission_id)->first(); } public function create(array $array) { $this->permission_name = $array['permission_name']; $this->save(); return $this; } }