Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sisage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marcos Albano
sisage
Commits
62d4ab61
Commit
62d4ab61
authored
Jan 22, 2021
by
Marcos Albano
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modificacao nos campos de usuario
parent
002a729d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
13 deletions
+62
-13
UserController.php
app/Http/Controllers/Admin/UserController.php
+7
-7
User.php
app/Models/User.php
+1
-1
agendamento.php
resources/lang/en/agendamento.php
+3
-0
agendamento.php
resources/lang/pt-br/agendamento.php
+3
-0
form.blade.php
resources/views/admin/users/form.blade.php
+42
-5
home.blade.php
resources/views/home.blade.php
+6
-0
No files found.
app/Http/Controllers/Admin/UserController.php
View file @
62d4ab61
...
...
@@ -13,7 +13,7 @@ class UserController extends Controller
{
private
$route
=
'users'
;
private
$paginate
=
10
;
private
$search
=
[
'n
ame'
,
'email
'
];
private
$search
=
[
'n
ome'
,
'email'
,
'sobrenome
'
];
private
$model
;
public
function
__construct
(
UserRepositoryInterface
$model
)
...
...
@@ -27,7 +27,10 @@ class UserController extends Controller
*/
public
function
index
(
Request
$request
)
{
$columnList
=
[
'id'
=>
'#'
,
'name'
=>
trans
(
'agendamento.name'
),
'email'
=>
trans
(
'agendamento.email'
)];
$columnList
=
[
'id'
=>
'#'
,
'nome'
=>
trans
(
'agendamento.name'
),
'email'
=>
trans
(
'agendamento.email'
),
'cpf'
=>
trans
(
'agendamento.cpf'
),
'sobrenome'
=>
trans
(
'agendamento.sobrenome'
),
'telefone'
=>
trans
(
'agendamento.telefone'
),
'data_nascimento'
=>
trans
(
'agendamento.data_nascimento'
)];
$page
=
trans
(
'agendamento.user_list'
);
$search
=
""
;
...
...
@@ -40,9 +43,6 @@ class UserController extends Controller
$routeName
=
$this
->
route
;
//$request->session()->flash('msg', 'Olá Alert');
//$request->session()->flash('status', 'success'); // success error notification
$breadcrumb
=
[
(
object
)
[
'url'
=>
route
(
'home'
),
'title'
=>
trans
(
'agendamento.home'
)],
(
object
)
[
'url'
=>
''
,
'title'
=>
trans
(
'agendamento.list'
,
[
'page'
=>
$page
])],
...
...
@@ -87,11 +87,11 @@ class UserController extends Controller
Validator
::
make
(
$data
,
[
'name'
=>
'required|string|max:255'
,
'sobrenome'
=>
'required|string'
,
'email'
=>
'required|string|email|max:255|unique:users'
,
'password'
=>
'required|string|min:6|confirmed'
,
'cpf'
=>
'required|string|min:11'
,
'telefone'
=>
'required|string|min:11'
,
'nome_mae'
=>
'required|string'
,
'data_nascimento'
=>
'required'
,
]);
...
...
@@ -186,11 +186,11 @@ class UserController extends Controller
Validator
::
make
(
$data
,
[
'name'
=>
'required|string|max:255'
,
'sobrenome'
=>
'required|string'
,
'email'
=>
[
'required'
,
'string'
,
'email'
,
'max:255'
,
Rule
::
unique
(
'users'
)
->
ignore
(
$id
)],
'password'
=>
'sometimes|required|string|min:6|confirmed'
,
'cpf'
=>
'required|string|min:11'
,
'telefone'
=>
'required|string|min:11'
,
'nome_mae'
=>
'required|string'
,
'data_nascimento'
=>
'required'
,
]);
...
...
app/Models/User.php
View file @
62d4ab61
...
...
@@ -16,7 +16,7 @@ class User extends Authenticatable
* @var array
*/
protected
$fillable
=
[
'n
ame'
,
'email'
,
'password
'
,
'n
ome'
,
'email'
,
'password'
,
'cpf'
,
'sobrenome'
,
'telefone'
,
'data_nascimento
'
,
];
/**
...
...
resources/lang/en/agendamento.php
View file @
62d4ab61
...
...
@@ -51,4 +51,7 @@ return [
'data'
=>
'Date'
,
'hora'
=>
'Hour'
,
'nome_mae'
=>
'Mother'
,
'data_nascimento'
=>
'Date of birth'
,
'telefone'
=>
'Phone'
,
'sobrenome'
=>
'Surname'
,
];
resources/lang/pt-br/agendamento.php
View file @
62d4ab61
...
...
@@ -49,4 +49,7 @@ return [
'data'
=>
'Data'
,
'hora'
=>
'Hora'
,
'nome_mae'
=>
'Mãe'
,
'data_nascimento'
=>
'Data de nascimento'
,
'telefone'
=>
'Telefone'
,
'sobrenome'
=>
'Sobrenome'
,
];
\ No newline at end of file
resources/views/admin/users/form.blade.php
View file @
62d4ab61
<div
class=
"row"
>
<div
class=
"form-group col-6"
>
<label
for=
"n
a
me"
>
{{ __('agendamento.name') }}
</label>
<input
type=
"text"
class=
"form-control{{ $errors->has('n
ame') ? ' is-invalid' : '' }}"
name=
"name"
value=
"{{ old('name') ?? ($register->na
me ?? '')}}"
>
@if ($errors->has('n
a
me'))
<label
for=
"n
o
me"
>
{{ __('agendamento.name') }}
</label>
<input
type=
"text"
class=
"form-control{{ $errors->has('n
ome') ? ' is-invalid' : '' }}"
name=
"nome"
value=
"{{ old('nome') ?? ($register->no
me ?? '')}}"
>
@if ($errors->has('n
o
me'))
<span
class=
"invalid-feedback"
role=
"alert"
>
<strong>
{{ $errors->first('name') }}
</strong>
<strong>
{{ $errors->first('nome') }}
</strong>
</span>
@endif
</div>
<div
class=
"form-group col-6"
>
<label
for=
"sobrenome"
>
{{ __('agendamento.sobrenome') }}
</label>
<input
type=
"text"
class=
"form-control{{ $errors->has('sobrenome') ? ' is-invalid' : '' }}"
name=
"sobrenome"
value=
"{{ old('sobrenome') ?? ($register->sobrenome ?? '')}}"
>
@if ($errors->has('sobrenome'))
<span
class=
"invalid-feedback"
role=
"alert"
>
<strong>
{{ $errors->first('sobrenome') }}
</strong>
</span>
@endif
</div>
<div
class=
"form-group col-6"
>
<label
for=
"email"
>
{{ __('agendamento.email') }}
</label>
<input
type=
"mail"
class=
"form-control{{ $errors->has('email') ? ' is-invalid' : '' }}"
name=
"email"
value=
"{{ old('email') ?? ($register->email ?? '')}}"
>
<input
type=
"
e
mail"
class=
"form-control{{ $errors->has('email') ? ' is-invalid' : '' }}"
name=
"email"
value=
"{{ old('email') ?? ($register->email ?? '')}}"
>
@if ($errors->has('email'))
<span
class=
"invalid-feedback"
role=
"alert"
>
<strong>
{{ $errors->first('email') }}
</strong>
</span>
@endif
</div>
<div
class=
"form-group col-6"
>
<label
for=
"cpf"
>
{{ __('agendamento.cpf') }}
</label>
<input
type=
"text"
class=
"form-control{{ $errors->has('cpf') ? ' is-invalid' : '' }}"
name=
"cpf"
value=
"{{ old('cpf') ?? ($register->cpf ?? '')}}"
>
@if ($errors->has('cpf'))
<span
class=
"invalid-feedback"
role=
"alert"
>
<strong>
{{ $errors->first('cpf') }}
</strong>
</span>
@endif
</div>
<div
class=
"form-group col-6"
>
<label
for=
"telefone"
>
{{ __('agendamento.telefone') }}
</label>
<input
type=
"text"
class=
"form-control{{ $errors->has('telefone') ? ' is-invalid' : '' }}"
name=
"telefone"
value=
"{{ old('telefone') ?? ($register->telefone ?? '')}}"
>
@if ($errors->has('telefone'))
<span
class=
"invalid-feedback"
role=
"alert"
>
<strong>
{{ $errors->first('telefone') }}
</strong>
</span>
@endif
</div>
<div
class=
"form-group col-6"
>
<label
for=
"data_nascimento"
>
{{ __('agendamento.data_nascimento') }}
</label>
<input
type=
"text"
class=
"form-control{{ $errors->has('data_nascimento') ? ' is-invalid' : '' }}"
name=
"data_nascimento"
value=
"{{ old('data_nascimento') ?? ($register->data_nascimento ?? '')}}"
>
@if ($errors->has('data_nascimento'))
<span
class=
"invalid-feedback"
role=
"alert"
>
<strong>
{{ $errors->first('data_nascimento') }}
</strong>
</span>
@endif
</div>
<div
class=
"form-group col-6"
>
<label
for=
"password"
>
{{ __('agendamento.password') }}
</label>
<input
type=
"password"
class=
"form-control{{ $errors->has('password') ? ' is-invalid' : '' }}"
name=
"password"
value=
""
>
...
...
resources/views/home.blade.php
View file @
62d4ab61
...
...
@@ -35,6 +35,12 @@
<
p
class
=
"card-text"
>@
lang
(
'agendamento.create_or_edit'
)
</
p
>
</
div
>
</
div
>
<
div
style
=
"cursor: pointer"
onclick
=
"window.location = '
{
{route('agendamentos.index')}
}
'"
class
=
"card text-white bg-warning mb-3"
style
=
"max-width: 18rem;"
>
<
div
class
=
"card-header"
>@
lang
(
'agendamento.list'
,
[
'page'
=>
__
(
'agendamento.agendamento_list'
)])
</
div
>
<
div
class
=
"card-body"
>
<
p
class
=
"card-text"
>@
lang
(
'agendamento.create_or_edit'
)
</
p
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
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