@@ -28,15 +28,15 @@ discard block |
||
28 | 28 | if ($this->request->wantsJson()) { |
29 | 29 | |
30 | 30 | $image = BrandService::getModelImage() |
31 | - ->select(['id','file', 'brand_id']) |
|
31 | + ->select(['id', 'file', 'brand_id']) |
|
32 | 32 | ->where('brand_id', '=', $brandId); |
33 | 33 | |
34 | 34 | $datatables = Datatables::of($image) |
35 | 35 | |
36 | - ->addColumn('thumb', function ($image) use ($brandId) { |
|
36 | + ->addColumn('thumb', function($image) use ($brandId) { |
|
37 | 37 | return '<img src="'.config('hideyo.public_path').'/brand/100x100/'.$image->brand_id.'/'.$image->file.'" />'; |
38 | 38 | }) |
39 | - ->addColumn('action', function ($image) use ($brandId) { |
|
39 | + ->addColumn('action', function($image) use ($brandId) { |
|
40 | 40 | $deleteLink = Form::deleteajax(url()->route('brand.images.destroy', array('brandId' => $brandId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
41 | 41 | $links = '<a href="'.url()->route('brand.images.edit', array('brandId' => $brandId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
42 | 42 | return $links; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return $datatables->make(true); |
46 | 46 | } |
47 | 47 | |
48 | - return view('backend.brand_image.index')->with(array( 'brand' => $brand)); |
|
48 | + return view('backend.brand_image.index')->with(array('brand' => $brand)); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function create($brandId) |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | public function store($brandId) |
58 | 58 | { |
59 | - $result = BrandService::createImage($this->request->all(), $brandId); |
|
59 | + $result = BrandService::createImage($this->request->all(), $brandId); |
|
60 | 60 | return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was inserted.'); |
61 | 61 | } |
62 | 62 | |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | |
69 | 69 | public function update($brandId, $brandImageId) |
70 | 70 | { |
71 | - $result = BrandService::updateImageById($this->request->all(), $brandId, $brandImageId); |
|
71 | + $result = BrandService::updateImageById($this->request->all(), $brandId, $brandImageId); |
|
72 | 72 | return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was updated.'); |
73 | 73 | } |
74 | 74 | |
75 | 75 | public function destroy($brandId, $brandImageId) |
76 | 76 | { |
77 | - $result = BrandService::destroyImage($brandImageId); |
|
77 | + $result = BrandService::destroyImage($brandImageId); |
|
78 | 78 | |
79 | 79 | if ($result) { |
80 | 80 | Notification::success('The file was deleted.'); |