Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Michael Ptáček
ptacek-cviceni19--it4
Commits
8fdd8692
Commit
8fdd8692
authored
2 years ago
by
tatarp
Browse files
Options
Download
Email Patches
Plain Diff
new
parent
ed4bf27e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/app/Http/Controllers/HomepageController.php
src/app/Http/Controllers/HomepageController.php
+1
-3
src/resources/views/homepage/form-test.blade.php
src/resources/views/homepage/form-test.blade.php
+2
-0
No files found.
src/app/Http/Controllers/HomepageController.php
View file @
8fdd8692
...
...
@@ -201,10 +201,8 @@ class HomepageController extends Controller
$cities
=
\
DB
::
table
(
"cities"
)
->
pluck
(
"name"
,
"id"
);
$address
=
Address
::
find
(
$id
);
// return \View::make('homepage.form-test', compact('address'), array('title' => 'Homepage:form-edit', "dataSelect" => $cities));
return
\
View
::
make
(
'homepage.form-test'
,
compact
(
'address'
),
array
(
'title'
=>
'Homepage:form-edit'
,
'id'
=>
$id
,
"dataSelect"
=>
$cities
));
//return view('homepage.form-test', array('title' => 'Homepage:form-edit', 'id' => $id, "dataSelect" => $cities));
return
\
View
::
make
(
'homepage.form-test'
,
array
(
'title'
=>
'Homepage:form-edit'
,
"dataSelect"
=>
$cities
,
"address"
=>
$address
));
}
}
This diff is collapsed.
Click to expand it.
src/resources/views/homepage/form-test.blade.php
View file @
8fdd8692
...
...
@@ -17,6 +17,7 @@
Form
test
</
div
>
<
div
class
=
"card-body"
>
{{
Form
::
model
(
$address
,
[
'route'
=>
'homepage_form_edit'
,
'method'
=>
'POST'
])
}}
<
form
name
=
"add-blog-post-form"
id
=
"add-blog-post-form"
method
=
"post"
action
=
"
{
{url('form-add')}
}
"
>
@
csrf
{{
--
{{
$errors
}}
--
}}
...
...
@@ -27,6 +28,7 @@
</
div
>
@
endforeach
@
endif
<
div
class
=
"form-group"
>
<
label
for
=
"name"
class
=
"form-label mt-4"
>
Jmeno
</
label
>
{{
Form
::
text
(
"name"
,
""
,
array
(
"class"
=>
"form-control"
,
"placeholder"
=>
"Vypln jmeno"
))}}
...
...
This diff is collapsed.
Click to expand it.
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