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
5e6aeadc
Commit
5e6aeadc
authored
Mar 10, 2024
by
alissonalbuquerque
Browse files
add refatoração de apelidos de rotas
parent
04bdd9ea
Changes
9
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/DashboardController.php
View file @
5e6aeadc
...
...
@@ -49,8 +49,5 @@ class DashboardController extends Controller
return
view
(
'dashboard'
,
[
'userPads'
=>
$userPads
,
'menu'
=>
Menu
::
HOME
]);
}
dd
(
'não entrou em nenhuh if'
);
//return redirect()->route('login');
}
}
app/Http/Controllers/TaskTimeController.php
View file @
5e6aeadc
...
...
@@ -32,7 +32,7 @@ class TaskTimeController extends Controller
if
(
$model
->
save
())
{
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'success'
,
'Cadastro realizado com sucesso!'
);
}
}
...
...
@@ -54,12 +54,12 @@ class TaskTimeController extends Controller
if
(
$model
->
save
())
{
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'success'
,
'Atualizado com sucesso!'
);
}
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'fail'
,
'Erro ao Atualizar!'
);
}
...
...
@@ -70,12 +70,12 @@ class TaskTimeController extends Controller
if
(
$model
->
delete
())
{
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'success'
,
'Deletado com sucesso!'
);
}
return
redirect
()
->
route
(
'
T
ask
T
ime
I
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
route
(
'
t
ask
_t
ime
_i
ndex'
,
[
'user_pad_id'
=>
$model
->
user_pad_id
])
->
with
(
'fail'
,
'Erro ao Deletar!'
);
}
...
...
resources/views/pad/teacher/view.blade.php
View file @
5e6aeadc
...
...
@@ -71,13 +71,13 @@
</
div
>
</
div
>
<
div
class
=
"card mx-2"
style
=
"width: 10rem;"
>
<
div
class
=
"card-body"
>
{{
--
<
div
class
=
"card mx-2"
style
=
"width: 10rem;"
>
--
}}
{{
--
<
div
class
=
"card-body"
>
<
h2
class
=
"text-center"
>
<
i
class
=
"bi bi-clock"
></
i
>
</
h2
>
<
h3
class
=
"text-center"
>
Horário
</
h3
>
<
a
class
=
"stretched-link btn-pad-horario"
href
=
"{{ route('
T
ask
T
ime
I
ndex', ['user_pad_id' =>
$user_pad_id
]) }}"
></
a
>
</
div
>
</
div
>
<
a
class
=
"stretched-link btn-pad-horario"
href
=
"{{ route('
t
ask
_t
ime
_i
ndex', ['user_pad_id' =>
$user_pad_id
]) }}"
></
a
>
</
div
>
--
}}
{{
--
</
div
>
--
}}
<
div
class
=
"card mx-2"
style
=
"width: 10rem;"
>
<
div
class
=
"card-body"
>
...
...
resources/views/task-time/create.blade.php
View file @
5e6aeadc
...
...
@@ -2,7 +2,7 @@
use
App\Models\TaskTime
;
@
endphp
<
form
id
=
"task-time-form"
action
=
"{{ route('
T
ask
T
ime
S
ave') }}"
method
=
"post"
>
<
form
id
=
"task-time-form"
action
=
"{{ route('
t
ask
_t
ime
_s
ave') }}"
method
=
"post"
>
@
csrf
@
method
(
'POST'
)
...
...
@@ -94,7 +94,7 @@
@include('pad.components.scripts.ajaxValidation', [
'btn_submit_id' => 'btn_submit',
'form_id' => 'task-time-form',
'route' => route('
T
ask
T
ime
V
alidation'),
'route' => route('
t
ask
_t
ime
_v
alidation'),
'form_type' => 'create',
])
...
...
@@ -117,7 +117,7 @@
}
},
ajax: {
url: '{{ route("
T
ask
S
earch
") }}',
url: '{{ route("
t
ask
_s
earch
") }}',
data: function(params) {
return {
q: params.term,
...
...
resources/views/task-time/index.blade.php
View file @
5e6aeadc
...
...
@@ -119,25 +119,25 @@
@
include
(
'pad.components.scripts.dimensao.ensino.show_modal'
,
[
'modal_id'
=>
'modal'
,
'route'
=>
route
(
'
T
ask
T
ime
C
reate'
,
[
'user_pad_id'
=>
$user_pad_id
]),
'route'
=>
route
(
'
t
ask
_t
ime
_c
reate'
,
[
'user_pad_id'
=>
$user_pad_id
]),
'btn_class'
=>
'task-time-create'
,
])
@
include
(
'pad.components.scripts.dimensao.ensino.show_modal'
,
[
'modal_id'
=>
'modal'
,
'route'
=>
route
(
'
T
ask
T
ime
E
dit'
),
'route'
=>
route
(
'
t
ask
_t
ime
_e
dit'
),
'btn_class'
=>
'btn-edit_task'
,
])
@
endsection
{{
--
@
include
(
'components.buttons.btn-edit'
,
[
'route'
=>
route
(
'
T
ask
T
ime
E
dit'
,
[
'id'
=>
$model
->
id
])
'route'
=>
route
(
'
t
ask
_t
ime
_e
dit'
,
[
'id'
=>
$model
->
id
])
])
@
include
(
'components.buttons.btn-delete'
,
[
'id'
=>
$model
->
id
,
'route'
=>
route
(
'
T
ask
T
ime
D
elete'
,
[
'id'
=>
$model
->
id
])
'route'
=>
route
(
'
t
ask
_t
ime
_d
elete'
,
[
'id'
=>
$model
->
id
])
])
--
}}
{{
--
@
foreach
(
$listTaskTime
as
$key
=>
$taskTimes
)
...
...
resources/views/task-time/update.blade.php
View file @
5e6aeadc
...
...
@@ -6,12 +6,12 @@
*/
@
endphp
<
form
id
=
"form-delete-
{
{$model->id}
}
"
action
=
"{{ route('
T
ask
T
ime
D
elete', ['id' =>
$model->id
]) }}"
method
=
"post"
>
<
form
id
=
"form-delete-
{
{$model->id}
}
"
action
=
"{{ route('
t
ask
_t
ime
_d
elete', ['id' =>
$model->id
]) }}"
method
=
"post"
>
@
method
(
'DELETE'
)
@
csrf
</
form
>
<
form
id
=
"task-time-update-form"
action
=
"{{ route('
T
ask
T
ime
U
pdate', ['id' =>
$model->id
]) }}"
method
=
"post"
>
<
form
id
=
"task-time-update-form"
action
=
"{{ route('
t
ask
_t
ime
_u
pdate', ['id' =>
$model->id
]) }}"
method
=
"post"
>
@
csrf
@
method
(
'POST'
)
...
...
@@ -115,7 +115,7 @@
@include('pad.components.scripts.ajaxValidation', [
'btn_submit_id' => 'btn_submit',
'form_id' => 'task-time-update-form',
'route' => route('
T
ask
T
ime
V
alidation'),
'route' => route('
t
ask
_t
ime
_v
alidation'),
'form_type' => 'update',
])
...
...
@@ -138,7 +138,7 @@
}
},
ajax: {
url: '{{ route("
T
ask
S
earch
") }}',
url: '{{ route("
t
ask
_s
earch
") }}',
data: function(params) {
return {
q: params.term,
...
...
routes/Task.php
View file @
5e6aeadc
...
...
@@ -4,6 +4,6 @@ use App\Http\Controllers\TaskController;
use
Illuminate\Support\Facades\Route
;
Route
::
prefix
(
'/tarefa/geral'
)
->
group
(
function
()
{
Route
::
get
(
'/search'
,
[
TaskController
::
class
,
'search'
])
->
name
(
'
T
ask
S
earch'
);
Route
::
get
(
'/search-by-id'
,
[
TaskController
::
class
,
'searchById'
])
->
name
(
'
T
ask
S
earch
ByI
d'
);
Route
::
get
(
'/search'
,
[
TaskController
::
class
,
'search'
])
->
name
(
'
t
ask
_s
earch'
);
Route
::
get
(
'/search-by-id'
,
[
TaskController
::
class
,
'searchById'
])
->
name
(
'
t
ask
_s
earch
_by_i
d'
);
});
\ No newline at end of file
routes/
T
ask
T
ime.php
→
routes/
t
ask
_t
ime.php
View file @
5e6aeadc
...
...
@@ -4,12 +4,12 @@ use App\Http\Controllers\TaskTimeController;
use
Illuminate\Support\Facades\Route
;
Route
::
prefix
(
'/tarefa/horario'
)
->
group
(
function
()
{
Route
::
get
(
'/index/{user_pad_id}'
,
[
TaskTimeController
::
class
,
'index'
])
->
name
(
'
T
ask
T
ime
I
ndex'
);
Route
::
get
(
'/create/{user_pad_id}'
,
[
TaskTimeController
::
class
,
'create'
])
->
name
(
'
T
ask
T
ime
C
reate'
);
Route
::
post
(
'/save'
,
[
TaskTimeController
::
class
,
'save'
])
->
name
(
'
T
ask
T
ime
S
ave'
);
Route
::
get
(
'/edit/{id?}'
,
[
TaskTimeController
::
class
,
'edit'
])
->
name
(
'
T
ask
T
ime
E
dit'
);
Route
::
post
(
'/update/{id}'
,
[
TaskTimeController
::
class
,
'update'
])
->
name
(
'
T
ask
T
ime
U
pdate'
);
Route
::
delete
(
'/delete/{id}'
,
[
TaskTimeController
::
class
,
'delete'
])
->
name
(
'
T
ask
T
ime
D
elete'
);
Route
::
get
(
'/search-task'
,
[
TaskTimeController
::
class
,
'searchTask'
])
->
name
(
'
T
ask
T
ime
S
earch
Task
'
);
Route
::
post
(
'/validation'
,
[
TaskTimeController
::
class
,
'ajaxValidation'
])
->
name
(
'
T
ask
T
ime
V
alidation'
);
Route
::
get
(
'/index/{user_pad_id}'
,
[
TaskTimeController
::
class
,
'index'
])
->
name
(
'
t
ask
_t
ime
_i
ndex'
);
Route
::
get
(
'/create/{user_pad_id}'
,
[
TaskTimeController
::
class
,
'create'
])
->
name
(
'
t
ask
_t
ime
_c
reate'
);
Route
::
post
(
'/save'
,
[
TaskTimeController
::
class
,
'save'
])
->
name
(
'
t
ask
_t
ime
_s
ave'
);
Route
::
get
(
'/edit/{id?}'
,
[
TaskTimeController
::
class
,
'edit'
])
->
name
(
'
t
ask
_t
ime
_e
dit'
);
Route
::
post
(
'/update/{id}'
,
[
TaskTimeController
::
class
,
'update'
])
->
name
(
'
t
ask
_t
ime
_u
pdate'
);
Route
::
delete
(
'/delete/{id}'
,
[
TaskTimeController
::
class
,
'delete'
])
->
name
(
'
t
ask
_t
ime
_d
elete'
);
Route
::
get
(
'/search-task'
,
[
TaskTimeController
::
class
,
'searchTask'
])
->
name
(
'
t
ask
_t
ime
_s
earch'
);
Route
::
post
(
'/validation'
,
[
TaskTimeController
::
class
,
'ajaxValidation'
])
->
name
(
'
t
ask
_t
ime
_v
alidation'
);
});
routes/web.php
View file @
5e6aeadc
...
...
@@ -49,7 +49,7 @@ require __DIR__ . '/user_type.php';
require
__DIR__
.
'/Task.php'
;
require
__DIR__
.
'/
T
ask
T
ime.php'
;
require
__DIR__
.
'/
t
ask
_t
ime.php'
;
require
__DIR__
.
'/dimensao/dimensao.php'
;
...
...
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