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
8942ab5a
Commit
8942ab5a
authored
Oct 21, 2019
by
Khumoyunmirzo Sodiqov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10/12/2019//22:31
parent
196c01fd
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
150 additions
and
85 deletions
+150
-85
OrderController.php
app/Http/Controllers/OrderController.php
+6
-6
Product.php
app/Models/Product.php
+1
-1
user_new.blade.php
resources/views/layouts/user_new.blade.php
+7
-0
order_create.blade.php
resources/views/pages/parcels/order_create.blade.php
+89
-28
address_add.blade.php
resources/views/pages/profile/address_add.blade.php
+28
-31
web.php
routes/web.php
+19
-19
No files found.
app/Http/Controllers/OrderController.php
View file @
8942ab5a
...
...
@@ -198,8 +198,8 @@ class OrderController extends Controller
if
(
$orderProducts
!=
null
)
{
foreach
(
$orderProducts
as
$item
)
{
$price
+=
$item
[
3
];
$weight
+=
$item
[
2
];
$price
+=
$item
[
2
];
//
$weight += $item[2];
$amount
+=
$item
[
1
];
}
}
...
...
@@ -219,8 +219,8 @@ class OrderController extends Controller
'flight_id'
=>
0
,
'added'
=>
Carbon
::
now
(),
'amount'
=>
$amount
,
'summa'
=>
(
$
weight
*
8
)
+
$serSum
,
'weight'
=>
$
weight
,
'summa'
=>
(
$
request
->
get
(
'weight'
)
*
8
)
+
$serSum
,
'weight'
=>
$
request
->
get
(
'weight'
)
,
'total'
=>
$price
,
'track_number'
=>
$this
->
generateUniqNumber
(
12
),
'is_site'
=>
0
,
...
...
@@ -249,8 +249,8 @@ class OrderController extends Controller
foreach
(
$orderProducts
as
$item
)
{
Product
::
create
([
'title'
=>
$item
[
0
],
'
weight'
=>
$item
[
2
],
'price'
=>
$item
[
3
],
'
comment'
=>
$item
[
3
],
'price'
=>
$item
[
2
],
'amount'
=>
$item
[
1
],
'order_id'
=>
$order
->
id
,
]);
...
...
app/Models/Product.php
View file @
8942ab5a
...
...
@@ -17,7 +17,7 @@ class Product extends Authenticatable
* @var array
*/
protected
$fillable
=
[
'operator_id'
,
'title'
,
'amount'
,
'weight'
,
'price'
,
'order_id'
,
'
sproduct_id
'
,
'operator_id'
,
'title'
,
'amount'
,
'weight'
,
'price'
,
'order_id'
,
'
comment
'
,
];
...
...
resources/views/layouts/user_new.blade.php
View file @
8942ab5a
...
...
@@ -87,6 +87,13 @@
<a
class=
"p-2 text-dark"
href=
"{{ route('package') }}"
>
Посылки
</a>
<a
class=
"p-2 text-dark"
href=
"{{ route('address') }}"
>
Адреса
</a>
<a
class=
"p-2 text-dark"
href=
"{{ url('/profile') }}"
>
Профиль
</a>
<a
class=
"p-2 text-dark"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
Выход
</a>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
</nav>
</div>
</div>
...
...
resources/views/pages/parcels/order_create.blade.php
View file @
8942ab5a
This diff is collapsed.
Click to expand it.
resources/views/pages/profile/address_add.blade.php
View file @
8942ab5a
...
...
@@ -14,23 +14,23 @@
<div class="
row
">
<div class="
col
-
xs
-
12
col
-
sm
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
name1
">Имя</label>
<label class="
form
-
label
" for="
forms
-
check
-
name1
">Имя
<span style="
color
:
#ff0912">*</span>
</label>
<
input
class
="
form
-
control
" id="
forms
-
check
-
name1
" type="
text
" name="
firstname
"
data-constraints="
@
Required
">
data-constraints="
@
Required
"
placeholder="
Имя
" 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>
<label class="
form
-
label
" for="
forms
-
check
-
last
-
name1
">Фамилия
<span style="
color
:
#ff0912">*</span>
</label>
<
input
class
="
form
-
control
" id="
forms
-
check
-
last
-
name1
" type="
text
" name="
secondname
"
data-constraints="
@
Required
">
data-constraints="
@
Required
"
placeholder="
Фамилия
" 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>
<label class="
form
-
label
" for="
forms
-
check
-
last
-
name1
">Отчество
<span style="
color
:
#ff0912">*</span>
</label>
<
input
class
="
form
-
control
" id="
forms
-
check
-
last
-
name1
" type="
text
" name="
fathername
"
data-constraints="
@
Required
">
data-constraints="
@
Required
"
placeholder="
Отчество
" required
>
</div>
</div>
</div>
...
...
@@ -38,23 +38,23 @@
<div class="
row
">
<div class="
col
-
md
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
company1
">Паспорт серия и номер</label>
<label class="
form
-
label
" for="
forms
-
check
-
company1
">Паспорт серия и номер
<span style="
color
:
#ff0912">*</span>
</label>
<
input
class
="
form
-
control
" id="
forms
-
check
-
company1
" type="
text
" name="
passport
"
data-constraints="
@
Required
">
data-constraints="
@
Required
"
placeholder="
Паспорт
серия
и
номер
" required
>
</div>
</div>
<div class="
col
-
md
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
company1
">Когда выдан</label>
<label class="
form
-
label
" for="
forms
-
check
-
company1
">Когда выдан
<span style="
color
:
#ff0912">*</span>
</label>
<
input
class
="
form
-
control
" id="
forms
-
check
-
company1
" type="
date
" name="
passport_issue
"
data-constraints="
@
Required
">
data-constraints="
@
Required
"
placeholder="
Когда
выдан
" required
>
</div>
</div>
<div class="
col
-
md
-
4
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
company1
">Кем выдан</label>
<label class="
form
-
label
" for="
forms
-
check
-
company1
">Кем выдан
<span style="
color
:
#ff0912">*</span>
</label>
<
input
class
="
form
-
control
" id="
forms
-
check
-
company1
" type="
text
" name="
passport_by
"
data-constraints="
@
Required
">
data-constraints="
@
Required
"
placeholder="
Кем
выдан
" required
>
</div>
</div>
</div>
...
...
@@ -63,9 +63,9 @@
<div class="
col
-
md
-
12
">
<!-- RD SelectMenu-->
<div class="
form
-
group
">
<label class="
form
-
label
" for="
involve
-
form
-
country1
">Страна</label>
<label class="
form
-
label
" for="
involve
-
form
-
country1
">Страна
<span style="
color
:
#ff0912">*</span>
</label>
<
select
class
="
form
-
control
" id="
involve
-
form
-
country1
" id="
country
" name="
country
"
data-placeholder="
Select
Your
Country
">
data-placeholder="
Select
Your
Country
"
required
>
@foreach(\App\Models\Country::all() as
$value
)
<option value="
{{
$value
->
id
}}
">{{
$value->title_ru
}}</option>
@endforeach
...
...
@@ -77,9 +77,9 @@
<div class="
col
-
xs
-
12
select
">
<!-- RD SelectMenu-->
<div class="
form
-
group
form
-
wrap
-
validation
">
<label class="
form
-
label
" for="
involve
-
form
-
country1
">Область</label>
<label class="
form
-
label
" for="
involve
-
form
-
country1
">Область
<span style="
color
:
#ff0912">*</span>
</label>
<
select
class
="
form
-
control
" id="
involve
-
form
-
country1
" name="
city
"
data-placeholder="
Select
Your
Area
">
data-placeholder="
Select
Your
Area
"
required
>
@foreach(\App\Models\City::all() as
$value
)
<option value="
{{
$value
->
id
}}
">{{
$value->title_ru
}}</option>
@endforeach
...
...
@@ -90,16 +90,14 @@
<div class="
row
">
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
street
">Улица</label>
<input type="
text
" class="
form
-
control
" id="
forms
-
check
-
street
" name="
street
" placeholder=""
value="">
<label class="
form
-
label
" for="
forms
-
check
-
street
">Улица <span style="
color
:
#ff0912">*</span></label>
<
input
type
=
"text"
class
="
form
-
control
" id="
forms
-
check
-
street
" name="
street
" placeholder="
Улица
" required>
</div>
</div>
<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="">
<label class="
form
-
label
" for="
forms
-
check
-
house
">Дом <span style="
color
:
#ff0912">*</span></label>
<
input
type
=
"text"
class
="
form
-
control
" id="
forms
-
check
-
house
" name="
house
" placeholder="
Дом
" required>
</div>
</div>
</div>
...
...
@@ -107,18 +105,17 @@
<div class="
row
">
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
appartment
">Квартира</label>
<label class="
form
-
label
" for="
forms
-
check
-
appartment
">Квартира
<span style="
color
:
#ff0912">*</span>
</label>
<
input
type
=
"text"
class
="
form
-
control
" id="
forms
-
check
-
appartment
" name="
apartment
"
placeholder=""
value="">
placeholder="
Квартира
" required>
</div>
</div>
<div class="
col
-
md
-
6
">
<div class="
form
-
group
">
<label class="
form
-
label
" for="
forms
-
check
-
postcode1
">ZIP код</label>
<label class="
form
-
label
" for="
forms
-
check
-
postcode1
">ZIP код
<span style="
color
:
#ff0912">*</span>
</label>
<
input
class
="
form
-
control
" id="
forms
-
check
-
postcode1
" type="
text
" name="
zip
"
data-constraints="
@
Required
">
data-constraints="
@
Required
"
placeholder="
ZIP
код
" required
>
</div>
</div>
</div>
...
...
@@ -126,16 +123,16 @@
<div class="
row
">
<div class="
col
-
md
-
6
">
<div class="
form
-
wrap
">
<label class="
form
-
label
" for="
forms
-
check
-
phone
">Номер телефона
.
</label>
<label class="
form
-
label
" for="
forms
-
check
-
phone
">Номер телефона
<span style="
color
:
#ff0912">*</span>
</label>
<
input
class
="
form
-
control
" id="
forms
-
check
-
phone
" type="
text
" name="
phone
"
data-constraints="
@
Required
">
data-constraints="
@
Required
"
placeholder="
Номер
телефона
" 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>
<label class="
form
-
label
" for="
involve
-
form
-
country1
">Выберите тип адреса
<span style="
color
:
#ff0912">*</span>
</label>
<
select
class
="
form
-
control
" id="
involve
-
form
-
country1
" name="
type
"
data-placeholder="
Выберите
тип
адреса
">
data-placeholder="
Выберите
тип
адреса
"
required
>
<option value="
sender
">Отправитель</option>
<option value="
recipient
">Получатель</option>
...
...
routes/web.php
View file @
8942ab5a
...
...
@@ -61,16 +61,16 @@ Route::post('/feedback/add', 'FeedbackController@addGuest');
//
//Route::get('/packages/pay', 'PackagesController@pay');
//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@address_delete'
)
->
name
(
'address.destroy'
);
Route
::
get
(
'/profile'
,
'ProfileController@profile'
);
Route
::
post
(
'/profile/save'
,
'ProfileController@save'
)
->
name
(
'profile.save'
);
Route
::
get
(
'/packages'
,
'OrderController@index'
)
->
name
(
'package'
)
->
middleware
(
'auth'
)
;
Route
::
get
(
'/packages/create/{id}'
,
'OrderController@create'
)
->
name
(
'package.create'
)
->
middleware
(
'auth'
)
;
Route
::
post
(
'/packages/order-store'
,
'OrderController@orderStore'
)
->
name
(
'package.store'
)
->
middleware
(
'auth'
)
;
Route
::
get
(
'/declaration/{package_id}'
,
'Postman\DeclarationController@generatePDF'
)
->
where
([
'package_id'
=>
'[0-9]+'
])
->
middleware
(
'auth'
)
;
Route
::
get
(
'/profile/address'
,
'ProfileController@address'
)
->
name
(
'address'
)
->
middleware
(
'auth'
)
;
Route
::
get
(
'/profile/addaddress'
,
'ProfileController@addaddress'
)
->
name
(
'address.add'
)
->
middleware
(
'auth'
)
;
Route
::
post
(
'/profile/storeaddress'
,
'ProfileController@storeaddress'
)
->
name
(
'address.store'
)
->
middleware
(
'auth'
)
;
Route
::
delete
(
'/profile/{id}'
,
'ProfileController@address_delete'
)
->
name
(
'address.destroy'
)
->
middleware
(
'auth'
)
;
Route
::
get
(
'/profile'
,
'ProfileController@profile'
)
->
middleware
(
'auth'
)
;
Route
::
post
(
'/profile/save'
,
'ProfileController@save'
)
->
name
(
'profile.save'
)
->
middleware
(
'auth'
)
;
//
//Route::get('/packages/list', 'PackagesController@pending_packages');
//Route::get('/packages/pending', 'PackagesController@pending_packages')->name('packagePending');
...
...
@@ -86,15 +86,15 @@ Route::post('/profile/save', 'ProfileController@save')->name('profile.save');
Route
::
get
(
'/profile/info'
,
'ProfileController@info'
)
->
middleware
(
'auth'
);
Route
::
post
(
'/profile/address/add'
,
'ProfileController@address_add'
)
->
middleware
(
'auth'
);
Route
::
get
(
'/profile/address/add'
,
'ProfileController@address_add'
);
Route
::
get
(
'/profile/address/edit/{id}'
,
'ProfileController@address_edit'
)
->
where
([
'id'
=>
'[0-9]+'
]);
Route
::
post
(
'/profile/address/edit/{id}'
,
'ProfileController@address_edit'
)
->
where
([
'id'
=>
'[0-9]+'
]);
Route
::
get
(
'/profile/address/delete/{id}'
,
'ProfileController@address_delete'
)
->
where
([
'id'
=>
'[0-9]+'
]);
Route
::
get
(
'/profile/address/set_default/{id}'
,
'ProfileController@address_set_default'
)
->
where
([
'id'
=>
'[0-9]+'
]);
Route
::
get
(
'/profile/edit/'
,
'ProfileController@edit_profile'
);
Route
::
post
(
'/profile/edit/'
,
'ProfileController@edit_profile'
);
Route
::
get
(
'/profile/password/'
,
'ProfileController@edit_password'
);
Route
::
post
(
'/profile/password/'
,
'ProfileController@edit_password'
);
Route
::
get
(
'/profile/address/add'
,
'ProfileController@address_add'
)
->
middleware
(
'auth'
)
;
Route
::
get
(
'/profile/address/edit/{id}'
,
'ProfileController@address_edit'
)
->
where
([
'id'
=>
'[0-9]+'
])
->
middleware
(
'auth'
)
;
Route
::
post
(
'/profile/address/edit/{id}'
,
'ProfileController@address_edit'
)
->
where
([
'id'
=>
'[0-9]+'
])
->
middleware
(
'auth'
)
;
Route
::
get
(
'/profile/address/delete/{id}'
,
'ProfileController@address_delete'
)
->
where
([
'id'
=>
'[0-9]+'
])
->
middleware
(
'auth'
)
;
Route
::
get
(
'/profile/address/set_default/{id}'
,
'ProfileController@address_set_default'
)
->
where
([
'id'
=>
'[0-9]+'
])
->
middleware
(
'auth'
)
;
Route
::
get
(
'/profile/edit/'
,
'ProfileController@edit_profile'
)
->
middleware
(
'auth'
)
;
Route
::
post
(
'/profile/edit/'
,
'ProfileController@edit_profile'
)
->
middleware
(
'auth'
)
;
Route
::
get
(
'/profile/password/'
,
'ProfileController@edit_password'
)
->
middleware
(
'auth'
)
;
Route
::
post
(
'/profile/password/'
,
'ProfileController@edit_password'
)
->
middleware
(
'auth'
)
;
Route
::
get
(
'/tariffs'
,
'HomeController@tariffs'
)
->
name
(
'tariffs'
);
Route
::
get
(
'/terms'
,
'HomeController@terms'
)
->
name
(
'terms'
);
...
...
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