Skip to content

Commit 23f0118

Browse files
committedAug 25, 2019
Merge branch 'pov' of https://github.com/vuthpov/realestate into pov
2 parents ad50bd4 + 5d2d83a commit 23f0118

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed
 

‎app/Http/Controllers/Admin/PartnerTypeController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function create()
3838
public function store(Request $request)
3939
{
4040
$this->validate($request,[
41-
'type' => 'required'
41+
'type' => 'required|unique:partner_types,partnerType'
4242
]);
4343

4444
$partnerType = new PartnerType;

‎app/Http/Controllers/Admin/Property_Type.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ public function create()
5555
public function store(Request $request)
5656
{
5757
$this->validate($request, [
58-
'propertyType' => 'required'
58+
'propertyType' => 'required|unique:property_types,propertyType'
5959
]);
60+
6061

6162
$propType = new PropertyType;
6263
$propType->propertyType = $request->propertyType;
@@ -99,7 +100,7 @@ public function edit($id)
99100
public function update(Request $request, $id)
100101
{
101102
$this->validate($request, [
102-
'propertyType' => 'required'
103+
'propertyType' => 'required|unique:property_types,propertyType'
103104
]);
104105

105106
PropertyType::where('propertyTypeId', $id)->update(['propertyType' => $request->propertyType]);

‎app/Http/Controllers/Admin/StaffController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Illuminate\Validation\Rule;
1111

1212
use Illuminate\Support\Facades\Storage;
13-
1413
use Illuminate\Support\Facades\DB;
1514

1615
class StaffController extends Controller
@@ -98,6 +97,7 @@ public function store(Request $request)
9897
'profile' => 'mimes:jpeg,jpg,png',
9998
'position' => 'required'
10099
]);
100+
101101

102102
$path = null;
103103
if ($request->file('profile') != null) {

‎composer.lock

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.