Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fazo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Shahzod
fazo
Commits
196c01fd
Commit
196c01fd
authored
Oct 20, 2019
by
Khumoyunmirzo Sodiqov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs
parent
d5c70c8f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
215 additions
and
104 deletions
+215
-104
OrderController.php
app/Http/Controllers/OrderController.php
+14
-6
ProfileController.php
app/Http/Controllers/ProfileController.php
+1
-1
Address.php
app/Models/Address.php
+19
-6
Orders.php
app/Models/Orders.php
+1
-0
user_new.blade.php
resources/views/layouts/user_new.blade.php
+7
-8
allpackages.blade.php
resources/views/pages/parcels/allpackages.blade.php
+1
-1
order_create.blade.php
resources/views/pages/parcels/order_create.blade.php
+113
-51
address_add.blade.php
resources/views/pages/profile/address_add.blade.php
+56
-29
addresses.blade.php
resources/views/pages/profile/addresses.blade.php
+1
-1
web.php
routes/web.php
+2
-1
No files found.
app/Http/Controllers/OrderController.php
View file @
196c01fd
...
...
@@ -34,6 +34,7 @@ class OrderController extends Controller
public
function
index
(
Request
$request
)
{
$id
=
Auth
::
user
()
->
id
;
$status_id
=
(
$request
->
get
(
'status_id'
))
?
$request
->
get
(
'status_id'
)
:
0
;
...
...
@@ -161,15 +162,17 @@ class OrderController extends Controller
$senderAddresses
=
Address
::
select
([
'id'
,
'user_id'
,
'country'
,
'city'
,
'street'
,
'house'
,
'apartment'
,
'zip'
,
'passport'
,
'type'
])
->
where
(
'type'
,
'='
,
0
)
->
get
();
])
->
where
(
'user_id'
,
'='
,
$id
)
->
get
();
// $senderAddresses->where('user_id', '=', $id)->get();
$recAddresses
=
Address
::
select
([
'id'
,
'country'
,
'city'
,
'street'
,
'house'
,
'apartment'
,
'zip'
,
'passport'
,
'type'
])
->
where
(
'
type'
,
'='
,
1
)
->
get
();
])
->
where
(
'
user_id'
,
'='
,
$id
)
->
get
();
// $recAddresses->where('user_id', '=', $id)->get();
$services
=
Service
::
select
([
'id'
,
'name_ru'
,
'price'
,
'status'
])
->
where
(
'status'
,
'='
,
1
)
->
get
();
...
...
@@ -178,8 +181,10 @@ class OrderController extends Controller
return
view
(
'pages.parcels.order_create'
,
[
'client'
=>
$client
,
'senderAddresses'
=>
$senderAddresses
,
'recAddresses'
=>
$recAddresses
,
'services'
=>
$services
]);
}
public
function
s
tore
(
Request
$request
)
public
function
orderS
tore
(
Request
$request
)
{
// dd($request);
$user
=
Auth
::
user
();
// $data = $request->json()->get('data');
...
...
@@ -207,6 +212,7 @@ class OrderController extends Controller
}
}
$order
=
Orders
::
create
([
'client_id'
=>
$request
->
get
(
'client_id'
),
'name'
=>
$request
->
get
(
'name'
),
...
...
@@ -219,11 +225,13 @@ class OrderController extends Controller
'track_number'
=>
$this
->
generateUniqNumber
(
12
),
'is_site'
=>
0
,
'is_payment_uzb'
=>
0
,
'from_address'
=>
$request
->
get
(
'from_address'
),
'to_address_id'
=>
$request
->
get
(
'to_address_id'
),
'payment_is_to_office'
=>
0
,
'delivery_info'
=>
$request
->
get
(
'delivery_info'
),
'payment_info'
=>
$request
->
get
(
'payment_info'
),
'comment'
=>
$request
->
get
(
'comment'
),
'client_type'
=>
'
Mobile
'
,
'client_type'
=>
'
WEB
'
,
'status_id'
=>
19
,
]);
...
...
@@ -249,7 +257,7 @@ class OrderController extends Controller
}
}
return
redirect
(
route
(
'
clients
'
));
return
redirect
(
route
(
'
package
'
));
}
}
app/Http/Controllers/ProfileController.php
View file @
196c01fd
...
...
@@ -88,7 +88,7 @@ class ProfileController extends Controller
$address
=
Address
::
find
((
int
)
$id
);
if
(
$address
->
exists
)
{
$image
=
Images
::
find
(
$address
->
scan_id
);
if
(
$image
->
exists
)
if
(
$image
)
$image
->
delete
();
$address
->
delete
();
}
...
...
app/Models/Address.php
View file @
196c01fd
...
...
@@ -10,14 +10,21 @@ namespace App\Models;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Support\Facades\DB
;
class
Address
extends
Model
{
protected
$table
=
'address_info'
;
public
$timestamps
=
false
;
protected
$fillable
=
[
'firstname'
,
'secondname'
,
'fathername'
,
'phone'
,
'country'
,
'oblast'
,
'city'
,
'street'
,
'house'
,
'apartment'
,
'zip'
,
'is_default'
];
protected
$fillable
=
[
'user_id'
,
'scan_id'
,
'firstname'
,
'secondname'
,
'fathername'
,
'phone'
,
'country'
,
'city'
,
'street'
,
'house'
,
'apartment'
,
'zip'
,
'is_default'
,
'created'
,
'zip'
,
'passport'
,
'passport_by'
,
'passport_issue'
,
'type'
,
'r_limit'
];
protected
$casts
=
[
'created'
=>
'datetime'
,
];
static
public
$country
=
[
'uzb'
=>
'Узбекистан'
];
...
...
@@ -43,18 +50,24 @@ class Address extends Model
return
$this
->
hasOne
(
'App\Models\Images'
,
'id'
,
'scan_id'
);
}
public
function
user
()
{
public
function
user
()
{
return
$this
->
belongsTo
(
'App\User'
,
'user_id'
,
'id'
);
}
public
function
getFormatedPassport
()
{
return
$this
->
passport
.
'| '
.
$this
->
passport_by
.
', '
.
$this
->
passport_issue
;
}
public
function
getFormated
()
{
return
$this
->
street
.
', '
.
$this
->
house
.
', '
.
$this
->
apartment
.
', '
.
$this
->
city
.
', '
.
self
::
$oblast
[
$this
->
oblast
]
.
', '
.
self
::
$country
[
$this
->
country
]
;
return
$this
->
street
.
', '
.
$this
->
house
.
', '
.
$this
->
apartment
.
', '
.
DB
::
raw
(
'select title_ru from city id='
.
$this
->
city
)
.
', '
.
DB
::
raw
(
'select title_ru from country id='
.
$this
->
country
)
;
}
public
function
getFIO
()
{
return
$this
->
firstname
.
' '
.
$this
->
secondname
.
' '
.
$this
->
fathername
;
return
$this
->
firstname
.
' '
.
$this
->
secondname
.
' '
.
$this
->
fathername
;
}
}
\ No newline at end of file
}
app/Models/Orders.php
View file @
196c01fd
...
...
@@ -43,6 +43,7 @@ class Orders extends Authenticatable
'client_type'
,
'delivery_info'
,
'label_url'
,
'payment_info'
,
'status_id'
];
...
...
resources/views/layouts/user_new.blade.php
View file @
196c01fd
...
...
@@ -9,14 +9,13 @@
<link
rel=
"stylesheet"
href=
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity=
"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"{{ asset('css/font-awesome.min.css') }}"
>
{{--
<script
--
}}
{{
--
src=
"https://code.jquery.com/jquery-3.4.1.min.js"
--
}}
{{
--
integrity=
"sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
--
}}
{{
--
crossorigin=
"anonymous"
></script>
--}}
{{--
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.compatibility.js"
></script>
--}}
<script
src=
"https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity=
"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin=
"anonymous"
></script>
<!-- jQuery -->
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"
type=
"text/javascript"
></script>
<!-- jQuery easing plugin -->
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"
type=
"text/javascript"
></script>
{{--
<script
src=
"https://code.jquery.com/jquery-3.3.1.slim.min.js"
--
}}
{{
--
integrity=
"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
--
}}
{{
--
crossorigin=
"anonymous"
></script>
--}}
<style>
body
{
background-color
:
#fbfbfb
!important
;
...
...
resources/views/pages/parcels/allpackages.blade.php
View file @
196c01fd
...
...
@@ -83,7 +83,7 @@
</td>
<td class="
text
-
center
">${{
$package->price
}}</td>
<td class="
text
-
center
">{{
$package->weight
}} кг</td>
<td class="
text
-
center
">{{
$package->summa
}}</td>
<td class="
text
-
center
">
$
{{
$package->summa
}}</td>
</tr>
@endforeach
</tbody>
...
...
resources/views/pages/parcels/order_create.blade.php
View file @
196c01fd
...
...
@@ -121,15 +121,15 @@
</h4>
</div>
</div>
<form id="
msform
" action="
#" method="POST"
<ul id="
progressbar
" class="
needs
-
validation
border
border
-
1
bg
-
white
">
<li class="
active
">СБОР ПОСЫЛКИ</li>
<li>АДРЕСА</li>
<li>ПОДТВЕРЖДЕНИЕ</li>
</ul>
<hr>
<form id="
msform
" action="
{{
route
(
'package.store'
)
}}
" method="
POST
"
class="
needs
-
validation
border
border
-
1
bg
-
white
p
-
5
" novalidate>
<ul id="
progressbar
" class="
needs
-
validation
border
border
-
1
bg
-
white
">
<li class="
active
">СБОР ПОСЫЛКИ</li>
<li>АДРЕСА</li>
<li>ПОДТВЕРЖДЕНИЕ</li>
</ul>
<hr>
{{ csrf_field() }}
<fieldset>
<div class="
mb
-
3
">
...
...
@@ -142,7 +142,7 @@
<div class="
mb
-
3
">
<label for="
comment
">Комментарий к посылке <span style="
color
:
#a01a1f">*</span></label>
<
input
type
=
"text"
class
="
form
-
control
" name="
comment
" id="
comment
"
>
<
textarea
type
=
"text"
class
="
form
-
control
" name="
comment
" id="
comment
"></textarea
>
</div>
<div class="
mb
-
3
">
<label for="">Декларация посылки <span style="
color
:
#a01a1f">*</span></label>
...
...
@@ -164,11 +164,11 @@
<tr class="
d
-
flex
">
<td class="
text
-
center
col
-
1
counter_number
">1</td>
<td class="
col
-
3
">
<input type="
text
" name="
product
[
0
][
0
]
" class="
form
-
control
form
-
control
-
sm
" required/>
<input type="
text
" name="
product
s
[
0
][
0
]
" class="
form
-
control
form
-
control
-
sm
" required/>
</td>
<td class="
col
-
2
">
<div class="
input
-
group
input
-
group
-
sm
">
<input type="
number
" name="
product
[
1
][
1
]
" class="
form
-
control
form
-
control
-
sm
count
"
<input type="
number
" name="
product
s
[
0
][
1
]
" class="
form
-
control
form
-
control
-
sm
count
"
id=""
value="
1
" required>
<div class="
invalid
-
feedback
">
...
...
@@ -178,7 +178,7 @@
</td>
<td class="
col
-
2
">
<div class="
input
-
group
input
-
group
-
sm
">
<input type="
number
" name="
product
[
2
][
0
]
" class="
form
-
control
form
-
control
-
sm
cost
"
<input type="
number
" name="
product
s
[
0
][
2
]
" class="
form
-
control
form
-
control
-
sm
cost
"
id=""
placeholder="
Username
" value="
2
" required>
<div class="
invalid
-
feedback
">
...
...
@@ -188,7 +188,7 @@
</td>
<td class="
col
-
2
">
<div class="
input
-
group
input
-
group
-
sm
">
<input type="
number
" step="
0.1
" name="
product
[
3
][
0
]
"
<input type="
number
" step="
0.1
" name="
product
s
[
0
][
3
]
"
class="
form
-
control
form
-
control
-
sm
"
id="
username
" placeholder="
Username
" value="
0.3
" required>
<div class="
invalid
-
feedback
">
...
...
@@ -218,7 +218,7 @@
</div>
<br/><br/>
<input type="
button
" name="
next
" class="
next
action
-
button
btn
btn
-
success
btn
-
lg
btn
-
block
mt
-
4
"
<input type="
button
" name="
next
" class="
next
action
-
button
btn
btn
-
primary
btn
-
lg
btn
-
block
mt
-
4
"
value="
Next
"/>
</fieldset>
<fieldset>
...
...
@@ -229,10 +229,12 @@
</div>
<hr>
<div class="
mb
-
3
">
<select name="
to_address_id
" class="
form
-
control
">
<select name="
from_address
" class="
form
-
control
">
@foreach(
$senderAddresses
as
$item
)
<option
value="
{{
$item
->
id
}}
">{{
$item->country
.', '.
$item->city
.', '.
$item->street
.', '.
$item->house
.', '.
$item->apartment
.', '.
$item->zip
.' | '.
$item->passport
}}</option>
@if(
$item->type
== 'sender')
<option
value="
{{
$item
->
id
}}
">{{
$item->country
.', '.
$item->city
.', '.
$item->street
.', '.
$item->house
.', '.
$item->apartment
.', '.
$item->zip
.' | Limit: $1000' }}</option>
@endif
@endforeach
</select>
</div>
...
...
@@ -247,60 +249,119 @@
<div class="
mb
-
3
">
<select name="
to_address_id
" class="
form
-
control
">
@foreach(
$recAddresses
as
$item
)
<option
value="
{{
$item
->
id
}}
">{{
$item->country
.', '.
$item->city
.', '.
$item->street
.', '.
$item->house
.', '.
$item->apartment
.', '.
$item->zip
.' | '.
$item->passport
}}</option>
@if(
$item->type
== 'recipient')
<option
value="
{{
$item
->
id
}}
">{{
$item->country
.', '.
$item->city
.', '.
$item->street
.', '.
$item->house
.', '.
$item->apartment
.', '.
$item->zip
.' | Limit: $1000' }}</option>
@endif
@endforeach
</select>
</div>
<br/><br/>
<div class="
col
-
12
" style="
display
:
inline
-
flex
">
<div class="
col
-
6
">
<input type="
button
" name="
previous
"
class="
previous
action
-
button
btn
btn
-
success
btn
-
lg
btn
-
block
mt
-
4
"
value="
Предыдущий
"/>
</div
>
<div class="
col
-
6
">
<input type="
button
" name="
next
"
class="
next
action
-
button
btn
btn
-
success
btn
-
lg
btn
-
block
mt
-
4
"
value="
Следующий
"/>
</div
>
</div>
<input type="
button
" name="
previous
"
style="
width
:
35
%
;
float
:
left
;
"
class="
previous
action
-
button
btn
btn
-
primary
btn
-
lg
btn
-
block
mt
-
4
"
value="
Предыдущий
"/
>
<input type="
button
" name="
next
"
style="
width
:
35
%
;
float
:
right
"
class="
next
action
-
button
btn
btn
-
primary
btn
-
lg
btn
-
block
mt
-
4
"
value="
Следующий
"/
>
</fieldset>
<fieldset>
<div class="
col
-
6
">
<input type="
button
" name="
previous
"
class="
previous
action
-
button
btn
btn
-
success
btn
-
lg
btn
-
block
mt
-
4
"
value="
Предыдущий
"/>
<h1>Выберите дополнительную услугу</h1>
<div class="
form
-
group
">
<div class="
col
-
sm
-
12
">
@foreach(
$services
as
$item
)
<div class="
checkbox
-
inline
" style="
display
:
inline
-
flex
">
<label style="
margin
-
right
:
15
px
;
">
<input type="
checkbox
" name="
services_id
[]
" value="
{{
$item
->
id
}}
"> {{
$item->name_ru
.' ($ '.
$item->price
.')' }}
</label>
</div>
@endforeach
</div>
</div>
<div class="
col
-
6
">
<input type="
button
" name="
next
"
class="
next
action
-
button
btn
btn
-
success
btn
-
lg
btn
-
block
mt
-
4
"
value="
Следующий
"/>
<br>
<hr>
<h1>Выберите тип доставки</h1>
<div class="
row
">
<div class="
col
-
md
-
4
">
<div class="
custom
-
control
custom
-
radio
">
<input type="
radio
" class="
custom
-
control
-
input
" id="
defaultUnchecked11
"
name="
delivery_info
" value="
Само
достовка
" checked>
<label class="
custom
-
control
-
label
" for="
defaultUnchecked11
">Само достовка</label>
</div>
<!-- Default checked -->
<div class="
custom
-
control
custom
-
radio
">
<input type="
radio
" class="
custom
-
control
-
input
" id="
defaultChecked22
"
name="
delivery_info
" value="
Вызов
курьера
">
<label class="
custom
-
control
-
label
" for="
defaultChecked22
">Вызов курьера</label>
</div>
</div>
</div>
<button class="
btn
btn
-
success
btn
-
lg
btn
-
block
mt
-
4
" type="
submit
">Зарегистрировать</button>
<br>
<hr>
<h1>Как Вы хотите оплачивать ?</h1>
<div class="
row
">
<div class="
col
-
md
-
4
">
<div class="
custom
-
control
custom
-
radio
">
<input type="
radio
" class="
custom
-
control
-
input
" id="
defaultUnchecked12
"
name="
payment_info
" value="
Наличньыми
" checked>
<label class="
custom
-
control
-
label
" for="
defaultUnchecked12
">Наличньыми</label>
</div>
<!-- Default checked -->
<div class="
custom
-
control
custom
-
radio
">
<input type="
radio
" class="
custom
-
control
-
input
" id="
defaultChecked21
"
name="
payment_info
" value="
По
телефону
">
<label class="
custom
-
control
-
label
" for="
defaultChecked21
">По телефону</label>
</div><!-- Default checked -->
<div class="
custom
-
control
custom
-
radio
">
<input type="
radio
" class="
custom
-
control
-
input
" id="
defaultChecked32
"
name="
payment_info
" value="
Online
">
<label class="
custom
-
control
-
label
" for="
defaultChecked32
">Online (VISA, PayPal,
MasterCard, AmericanExpress)</label>
</div>
</div>
</div>
<input type="
button
" name="
previous
"
style="
width
:
35
%
;
float
:
left
"
class="
previous
action
-
button
btn
btn
-
primary
btn
-
lg
btn
-
block
mt
-
4
"
value="
Предыдущий
"/>
<button class="
btn
btn
-
primary
btn
-
lg
btn
-
block
mt
-
4
"
style="
width
:
35
%
;
float
:
right
;
"
type="
submit
">Зарегистрировать
</button>
</fieldset>
</form>
</div>
</section>
<script>
'use strict'
//jQuery time
var current_fs, next_fs, previous_fs; //fieldsets
var left, opacity, scale; //fieldset properties which we will animate
var animating; //flag to prevent quick multi-click glitches
$("
.
next
").click(function () {
if (animating) return false;
animating = true;
//
if (animating) return false;
//
animating = true;
current_fs = $(this).parent();
next_fs = $(this).parent().next();
//activate next step on progressbar using the index of next_fs
$("
#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
console
.
log
(
current_fs
);
console
.
log
(
previous_fs
);
//show the next fieldset
next_fs
.
show
();
//hide the current fieldset with style
...
...
@@ -331,12 +392,13 @@
});
$
(
".previous"
)
.
click
(
function
()
{
if
(
animating
)
return
false
;
animating
=
true
;
//
if (animating) return false;
//
animating = true;
current_fs
=
$
(
this
)
.
parent
();
previous_fs
=
$
(
this
)
.
parent
()
.
prev
();
console
.
log
(
current_fs
);
console
.
log
(
previous_fs
);
//de-activate current step on progressbar
$
(
"#progressbar li"
)
.
eq
(
$
(
"fieldset"
)
.
index
(
current_fs
))
.
removeClass
(
"active"
);
...
...
@@ -419,11 +481,11 @@
$
(
'#table_package > tbody:last-child'
)
.
append
(
'<tr class="d-flex">\n'
+
' <td class="text-center col-1 counter_number">'
+
counter
+
'</td>\n'
+
' <td class="col-3">\n'
+
' <input type="text" name="product['
+
counter
+
'][0]" class="form-control form-control-sm" required />\n'
+
' <input type="text" name="product
s
['
+
counter
+
'][0]" class="form-control form-control-sm" required />\n'
+
' </td>\n'
+
' <td class="col-2">\n'
+
' <div class="input-group input-group-sm">\n'
+
' <input type="number" name="product['
+
counter
+
'][1]" class="form-control form-control-sm count" id="" value="1" required>\n'
+
' <input type="number" name="product
s
['
+
counter
+
'][1]" class="form-control form-control-sm count" id="" value="1" required>\n'
+
' <div class="invalid-feedback" >\n'
+
' Укажите количество единиц товара\n'
+
' </div>\n'
+
...
...
@@ -431,7 +493,7 @@
' </td>\n'
+
' <td class="col-2">\n'
+
' <div class="input-group input-group-sm">\n'
+
' <input type="number" name="product['
+
counter
+
'][2]" class="form-control form-control-sm cost" id="" placeholder="Username" value="2" required>\n'
+
' <input type="number" name="product
s
['
+
counter
+
'][2]" class="form-control form-control-sm cost" id="" placeholder="Username" value="2" required>\n'
+
' <div class="invalid-feedback" >\n'
+
' Укажите стоимость за единицу товара\n'
+
' </div>\n'
+
...
...
@@ -439,7 +501,7 @@
' </td>\n'
+
' <td class="col-2">\n'
+
' <div class="input-group input-group-sm">\n'
+
' <input type="number" step="0.1" name="product['
+
counter
+
'][3]" class="form-control form-control-sm" id="username" placeholder="Username" value="0.3" required>\n'
+
' <input type="number" step="0.1" name="product
s
['
+
counter
+
'][3]" class="form-control form-control-sm" id="username" placeholder="Username" value="0.3" required>\n'
+
' <div class="invalid-feedback" >\n'
+
' Your username is required.\n'
+
' </div>\n'
+
...
...
resources/views/pages/profile/address_add.blade.php
View file @
196c01fd
...
...
@@ -12,27 +12,48 @@
<form method="
post
" action="
{{
route
(
'address.store'
)
}}
" class="
needs
-
validation
border
border
-
1
bg
-
white
p
-
5
">
@csrf
<div class="
row
">
<div class="
col
-
xs
-
12
col
-
sm
-
6
">
<div class="
col
-
xs
-
12
col
-
sm
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
name1
">Имя</label>
<input class="
form
-
control
" id="
forms
-
check
-
name1
" type="
text
" name="
name1
"
<input class="
form
-
control
" id="
forms
-
check
-
name1
" type="
text
" name="
firstname
"
data-constraints="
@
Required
">
</div>
</div>
<div class="
col
-
xs
-
12
col
-
sm
-
6
">
<div class="
col
-
xs
-
12
col
-
sm
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
last
-
name1
">Фамилия</label>
<input class="
form
-
control
" id="
forms
-
check
-
last
-
name1
" type="
text
" name="
last
-
name1
"
<input class="
form
-
control
" id="
forms
-
check
-
last
-
name1
" type="
text
" name="
secondname
"
data-constraints="
@
Required
">
</div>
</div>
<div class="
col
-
xs
-
12
col
-
sm
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
last
-
name1
">Отчество</label>
<input class="
form
-
control
" id="
forms
-
check
-
last
-
name1
" type="
text
" name="
fathername
"
data-constraints="
@
Required
">
</div>
</div>
</div>
<div class="
row
">
<div class="
col
-
md
-
12
">
<div class="
col
-
md
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
company1
">Паспорт серия и номер</label>
<input class="
form
-
control
" id="
forms
-
check
-
company1
" type="
text
" name="
passport
"
data-constraints="
@
Required
">
</div>
</div>
<div class="
col
-
md
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
company1
">Когда выдан</label>
<input class="
form
-
control
" id="
forms
-
check
-
company1
" type="
date
" name="
passport_issue
"
data-constraints="
@
Required
">
</div>
</div>
<div class="
col
-
md
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
company1
">
Паспорт
</label>
<input class="
form
-
control
" id="
forms
-
check
-
company1
" type="
text
" name="
company1
"
<label class="
form
-
label
" for="
forms
-
check
-
company1
">
Кем выдан
</label>
<input class="
form
-
control
" id="
forms
-
check
-
company1
" type="
text
" name="
passport_by
"
data-constraints="
@
Required
">
</div>
</div>
...
...
@@ -45,8 +66,8 @@
<label class="
form
-
label
" for="
involve
-
form
-
country1
">Страна</label>
<select class="
form
-
control
" id="
involve
-
form
-
country1
" id="
country
" name="
country
"
data-placeholder="
Select
Your
Country
">
@foreach(\App\Models\
Address::
$country
as
$key
=>
$value
)
<option value="
{{
$
key
}}
">{{
$value
}}</option>
@foreach(\App\Models\
Country::all() as
$value
)
<option value="
{{
$
value
->
id
}}
">{{
$value->title_ru
}}</option>
@endforeach
</select>
</div>
...
...
@@ -57,23 +78,16 @@
<!-- RD SelectMenu-->
<div class="
form
-
group
form
-
wrap
-
validation
">
<label class="
form
-
label
" for="
involve
-
form
-
country1
">Область</label>
<select class="
form
-
control
" id="
involve
-
form
-
country1
" name="
oblast
"
<select class="
form
-
control
" id="
involve
-
form
-
country1
" name="
city
"
data-placeholder="
Select
Your
Area
">
@foreach(\App\Models\
Address::
$oblast
as
$key
=>
$value
)
<option value="
{{
$
key
}}
">{{
$value
}}</option>
@foreach(\App\Models\
City::all() as
$value
)
<option value="
{{
$
value
->
id
}}
">{{
$value->title_ru
}}</option>
@endforeach
</select>
</div>
</div>
<div class="
row
">
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
city
">Город</label>
<input type="
text
" class="
form
-
control
" id="
forms
-
check
-
city
" name="
city
" placeholder="" value="">
</div>
</div>
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
street
">Улица</label>
...
...
@@ -81,25 +95,26 @@
value="">
</div>
</div>
</div>
<div class="
row
">
<div class="
col
-
md
-
4
">
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
house
">Дом</label>
<input type="
text
" class="
form
-
control
" id="
forms
-
check
-
house
" name="
house
" placeholder="" value="">
<input type="
text
" class="
form
-
control
" id="
forms
-
check
-
house
" name="
house
" placeholder=""
value="">
</div>
</div>
</div>
<div class="
col
-
md
-
4
">
<div class="
row
">
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
appartment
">Квартира</label>
<input type="
text
" class="
form
-
control
" id="
forms
-
check
-
appartment
" name="
apartment
" placeholder=""
<input type="
text
" class="
form
-
control
" id="
forms
-
check
-
appartment
" name="
apartment
"
placeholder=""
value="">
</div>
</div>
<div class="
col
-
md
-
4
">
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
postcode1
">ZIP код</label>
<input class="
form
-
control
" id="
forms
-
check
-
postcode1
" type="
text
" name="
zip
"
...
...
@@ -109,13 +124,25 @@
</div>
<div class="
row
">
<div class="
col
-
md
-
12
">
<div class="
col
-
md
-
6
">
<div class="
form
-
wrap
">
<label class="
form
-
label
" for="
forms
-
check
-
phone
">Номер телефона.</label>
<input class="
form
-
control
" id="
forms
-
check
-
phone
" type="
text
" name="
p
ostcod
e
"
<input class="
form
-
control
" id="
forms
-
check
-
phone
" type="
text
" name="
p
hon
e
"
data-constraints="
@
Required
">
</div>
</div>
<div class="
col
-
md
-
6
select
">
<div class="
form
-
group
form
-
wrap
-
validation
">
<label class="
form
-
label
" for="
involve
-
form
-
country1
">Выберите тип адреса</label>
<select class="
form
-
control
" id="
involve
-
form
-
country1
" name="
type
"
data-placeholder="
Выберите
тип
адреса
">
<option value="
sender
">Отправитель</option>
<option value="
recipient
">Получатель</option>
</select>
</div>
</div>
</div>
<button class="
btn
btn
-
primary
btn
-
sm
mt
-
4
shadow
" type="
submit
">Добавить Адрес</button>
...
...
resources/views/pages/profile/addresses.blade.php
View file @
196c01fd
...
...
@@ -31,7 +31,7 @@
<tr>
<td>{{
$i
++ }}</td>
<td>{{
$unit->firstname
}} {{
$unit->lastname
}}</td>
<td>{{
$unit->
passport
}}
<td>{{
$unit->
getFormatedPassport
()
}}
</td>
<td>{{
$unit->getFormated
() }}</td>
<td>
...
...
routes/web.php
View file @
196c01fd
...
...
@@ -63,11 +63,12 @@ Route::post('/feedback/add', 'FeedbackController@addGuest');
//Route::get('/packages/addr', 'PackagesController@addr');
Route
::
get
(
'/packages'
,
'OrderController@index'
)
->
name
(
'package'
);
Route
::
get
(
'/packages/create/{id}'
,
'OrderController@create'
)
->
name
(
'package.create'
);
Route
::
post
(
'/packages/order-store'
,
'OrderController@orderStore'
)
->
name
(
'package.store'
);
Route
::
get
(
'/declaration/{package_id}'
,
'Postman\DeclarationController@generatePDF'
)
->
where
([
'package_id'
=>
'[0-9]+'
]);
Route
::
get
(
'/profile/address'
,
'ProfileController@address'
)
->
name
(
'address'
);
Route
::
get
(
'/profile/addaddress'
,
'ProfileController@addaddress'
)
->
name
(
'address.add'
);
Route
::
post
(
'/profile/storeaddress'
,
'ProfileController@storeaddress'
)
->
name
(
'address.store'
);
Route
::
delete
(
'/profile/{id}'
,
'ProfileController@
deleteaddress
'
)
->
name
(
'address.destroy'
);
Route
::
delete
(
'/profile/{id}'
,
'ProfileController@
address_delete
'
)
->
name
(
'address.destroy'
);
Route
::
get
(
'/profile'
,
'ProfileController@profile'
);
Route
::
post
(
'/profile/save'
,
'ProfileController@save'
)
->
name
(
'profile.save'
);
//
...
...
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