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
d7132521
Commit
d7132521
authored
Feb 02, 2022
by
alissonalbuquerque
Browse files
alteração de models e add de novos models
parent
debc5735
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Models/Campus.php
0 → 100644
View file @
d7132521
<?php
namespace
App\Models
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
class
Campus
extends
Model
{
use
HasFactory
;
/**
* References table campus
*
* @var string
*/
protected
$table
=
"campus"
;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected
$fillable
=
[
'name'
,
'unidade'
];
}
app/Models/Curso.php
View file @
d7132521
...
@@ -9,10 +9,19 @@ class Curso extends Model
...
@@ -9,10 +9,19 @@ class Curso extends Model
{
{
use
HasFactory
;
use
HasFactory
;
/**
* References table curso
*
* @var string
*/
protected
$table
=
'curso'
;
protected
$table
=
'curso'
;
protected
$fillable
=
[
'name'
];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected
$fillable
=
[
'name'
,
'campus_id'
];
}
}
app/Models/User.php
View file @
d7132521
...
@@ -12,26 +12,28 @@ class User extends Authenticatable
...
@@ -12,26 +12,28 @@ class User extends Authenticatable
{
{
use
HasApiTokens
,
HasFactory
,
Notifiable
;
use
HasApiTokens
,
HasFactory
,
Notifiable
;
const
TYPE_MENAGER
=
1
;
const
TYPE_TEACHER
=
2
;
const
STATUS_ACTIVE
=
1
;
const
STATUS_INACTIVE
=
2
;
CONST
STATUS_DELETED
=
0
;
protected
$table
=
"users"
;
/**
/**
* The attributes that are mass assignable.
* The attributes that are mass assignable.
*
*
* @var array<int, string>
* @var array<int, string>
*/
*/
protected
$fillable
=
[
protected
$fillable
=
[
'name'
,
'email'
,
'password'
,
'document'
,
'type'
,
'status'
,
'unidade'
,
'curso_id'
];
'name'
,
'email'
,
'password'
,
];
/**
/**
* The attributes that should be hidden for serialization.
* The attributes that should be hidden for serialization.
*
*
* @var array<int, string>
* @var array<int, string>
*/
*/
protected
$hidden
=
[
protected
$hidden
=
[
'password'
,
'remember_token'
];
'password'
,
'remember_token'
,
];
/**
/**
* The attributes that should be cast.
* The attributes that should be cast.
...
@@ -39,6 +41,6 @@ class User extends Authenticatable
...
@@ -39,6 +41,6 @@ class User extends Authenticatable
* @var array<string, string>
* @var array<string, string>
*/
*/
protected
$casts
=
[
protected
$casts
=
[
'email_verified_at'
=>
'datetime'
,
'email_verified_at'
=>
'datetime'
];
];
}
}
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