Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kalendar-unesa
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Febry San
kalendar-unesa
Commits
e9205cf9
Commit
e9205cf9
authored
Mar 27, 2023
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pivot table
parent
6cf8c5ca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
16 deletions
+26
-16
app/Models/Agenda.php
+9
-4
app/Models/Pegawai.php
+9
-4
app/Models/UserAgenda.php
+8
-8
No files found.
app/Models/Agenda.php
View file @
e9205cf9
...
...
@@ -14,10 +14,10 @@ class Agenda extends Model
'id'
,
'nama'
,
'tanggal'
,
'waktu_mulai'
,
'waktu_selesai'
,
'lokasi'
,
'statusacara'
,
'idunit'
,
'idkategori'
,
'linkzoom'
,
'idattachment'
,
'created_at'
,
'updated_at'
,
'deleted_at'
,
'userid_created'
,
'userid_updated'
];
public
function
rUserAgenda
()
{
return
$this
->
hasMany
(
UserAgenda
::
class
,
'id'
,
'idagenda'
);
}
//
public function rUserAgenda()
//
{
//
return $this->hasMany(UserAgenda::class, 'id', 'idagenda');
//
}
public
function
rUnit
()
{
...
...
@@ -33,4 +33,9 @@ public function rAttachment()
{
return
$this
->
hasMany
(
Attachment
::
class
,
'idattachment'
,
'id'
);
}
public
function
rPegawai
()
{
return
$this
->
belongsToMany
(
Pegawai
::
class
,
'tr_agenda_pegawai'
,
'idagenda'
,
'idpegawai'
);
}
}
app/Models/Pegawai.php
View file @
e9205cf9
...
...
@@ -14,10 +14,10 @@ class Pegawai extends Model
'id'
,
'nama'
,
'nip'
,
'idunit'
,
'statusaktif'
,
'created_at'
,
'updated_at'
,
'deleted_at'
,
];
public
function
rUserAgenda
()
{
return
$this
->
hasMany
(
UserAgenda
::
class
,
'id'
,
'idpegawai'
);
}
//
public function rUserAgenda()
//
{
//
return $this->hasMany(UserAgenda::class, 'id', 'idpegawai');
//
}
public
function
rUnit
()
{
...
...
@@ -28,4 +28,9 @@ public function rUsers()
{
return
$this
->
hasOne
(
Users
::
class
,
'id'
,
'idpegawai'
);
}
public
function
rAgenda
()
{
return
$this
->
belongsToMany
(
Agenda
::
class
,
'tr_agenda_pegawai'
,
'idpegawai'
,
'idagenda'
);
}
}
app/Models/UserAgenda.php
View file @
e9205cf9
...
...
@@ -14,13 +14,13 @@ class UserAgenda extends Model
'id'
,
'idpegawai'
,
'idagenda'
,
'statuskehadiran'
,
'created_at'
,
'updated_at'
,
'deleted_at'
,
];
public
function
rPegawai
()
{
return
$this
->
hasOne
(
Pegawai
::
class
,
'idpegawai'
,
'id'
);
}
//
public function rPegawai()
//
{
//
return $this->hasOne(Pegawai::class, 'idpegawai', 'id');
//
}
public
function
rAgenda
()
{
return
$this
->
hasOne
(
UserAgenda
::
class
,
'idagenda'
,
'id'
);
}
//
public function rAgenda()
//
{
//
return $this->hasOne(UserAgenda::class, 'idagenda', 'id');
//
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment