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
submeta
Commits
ef3d4eec
Commit
ef3d4eec
authored
Jul 20, 2022
by
S-Nathalia
Browse files
natureza id adicionado
parent
a21ee1c3
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
ef3d4eec
...
...
@@ -989,6 +989,7 @@ class TrabalhoController extends Controller
}
DB
::
commit
();
if
(
!
$request
->
has
(
'rascunho'
))
{
// SubmissaoNotification.php
Notification
::
send
(
Auth
::
user
(),
new
SubmissaoNotification
(
$id
,
$trabalho
->
titulo
));
}
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Proposta atualizada!'
]);
...
...
@@ -1133,6 +1134,7 @@ class TrabalhoController extends Controller
'tipo'
=>
1
,
]);
$notificacao
->
save
();
// SubmissaoRecebidaNotification.php
Notification
::
send
(
$userTemp
,
new
SubmissaoRecebidaNotification
(
$trabalho
->
id
,
$trabalho
->
titulo
,
$userTemp
));
//Proponente
$notificacao
=
App\Notificacao
::
create
([
...
...
@@ -1143,7 +1145,8 @@ class TrabalhoController extends Controller
'tipo'
=>
1
,
]);
$notificacao
->
save
();
Notification
::
send
(
Auth
::
user
(),
new
SubmissaoNotification
(
$trabalho
->
id
,
$trabalho
->
titulo
));
// submissao e notificação.php $trabalho->id,$trabalho->titulo
Notification
::
send
(
Auth
::
user
(),
new
SubmissaoNotification
(
$trabalho
));
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Proposta submetida!'
]);
...
...
app/Notifications/SubmissaoNotification.php
View file @
ef3d4eec
...
...
@@ -14,17 +14,19 @@ class SubmissaoNotification extends Notification
public
$data
;
public
$url
;
public
$natureza_id
;
/**
* Create a new notification instance.
*
* @return void
*/
public
function
__construct
(
$
id
,
$titul
o
)
public
function
__construct
(
$
trabalh
o
)
{
$this
->
data
=
date
(
'd/m/Y \à\s H:i\h'
,
strtotime
(
now
()));
$url
=
"/projeto/visualizar/"
.
$id
;
$url
=
"/projeto/visualizar/"
.
$
trabalho
->
id
;
$this
->
url
=
url
(
$url
);
$this
->
titulo
=
$titulo
;
$this
->
titulo
=
$trabalho
->
titulo
;
$this
->
natureza_id
=
$trabalho
->
evento
->
natureza_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