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
38da2d41
Commit
38da2d41
authored
Mar 05, 2024
by
alissonalbuquerque
Browse files
update
parent
cbe679a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/DashboardController.php
View file @
38da2d41
...
@@ -27,8 +27,6 @@ class DashboardController extends Controller
...
@@ -27,8 +27,6 @@ class DashboardController extends Controller
if
(
$user
->
isTypeTeacher
())
{
if
(
$user
->
isTypeTeacher
())
{
dd
(
'professor'
);
$userPads
=
UserPad
::
whereUserId
(
$user
->
id
)
->
whereStatus
(
Status
::
ATIVO
)
->
get
();
$userPads
=
UserPad
::
whereUserId
(
$user
->
id
)
->
whereStatus
(
Status
::
ATIVO
)
->
get
();
return
view
(
'dashboard'
,
[
'userPads'
=>
$userPads
,
'menu'
=>
Menu
::
HOME
]);
return
view
(
'dashboard'
,
[
'userPads'
=>
$userPads
,
'menu'
=>
Menu
::
HOME
]);
...
...
app/Models/User.php
View file @
38da2d41
...
@@ -192,7 +192,7 @@ class User extends Authenticatable
...
@@ -192,7 +192,7 @@ class User extends Authenticatable
* @return UserType|Null
* @return UserType|Null
*/
*/
public
function
profileSelected
()
public
function
profileSelected
()
{
{
return
$this
->
profiles
()
->
whereSelected
(
true
)
->
first
();
return
$this
->
profiles
()
->
whereSelected
(
true
)
->
first
();
}
}
...
@@ -213,7 +213,6 @@ class User extends Authenticatable
...
@@ -213,7 +213,6 @@ class User extends Authenticatable
// 'professor',
// 'professor',
// 'profile' => $this->profileSelected()->type === UserType::TEACHER
// 'profile' => $this->profileSelected()->type === UserType::TEACHER
// ]);
// ]);
return
true
;
return
$this
->
profileSelected
()
->
type
===
UserType
::
TEACHER
;
return
$this
->
profileSelected
()
->
type
===
UserType
::
TEACHER
;
}
}
...
...
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