Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
pad-upe
Commits
a63fdb9c
Commit
a63fdb9c
authored
Mar 11, 2022
by
alissonalbuquerque
Browse files
add model de Campus
parent
983c2ceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Models/Campus.php
View file @
a63fdb9c
...
...
@@ -21,6 +21,23 @@ class Campus extends Model
*
* @var array
*/
protected
$fillable
=
[
'name'
,
'unidade'
];
protected
$fillable
=
[
'name'
,
'unidade
_id
'
];
/**
* Get Unidade with unidade.id = campus.unidade_id
*
* @return Unidade
*/
public
function
unidade
()
{
return
$this
->
belongsTo
(
Unidade
::
class
);
}
/**
* @return string
*/
public
function
__toString
()
{
return
$this
->
name
;
}
}
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