cqpCow 1 vuosi sitten
vanhempi
commit
0015fb1293

+ 73 - 0
app/Http/Controllers/Api/ContactsController.php

@@ -0,0 +1,73 @@
+<?php
+
+namespace App\Http\Controllers\Api;
+
+use App\Service\ContactsService;
+use Illuminate\Http\Request;
+
+class ContactsController extends BaseController
+{
+    public function contactsAdd(Request $request)
+    {
+        $service = new ContactsService();
+        $userData = $request->userData->toArray();
+        list($status,$data) = $service->contactsAdd($request->all(),$userData);
+
+        if($status){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+
+    public function contactsEdit(Request $request)
+    {
+        $service = new ContactsService();
+        $userData = $request->userData->toArray();
+        list($status,$data) = $service->contactsEdit($request->all(),$userData);
+
+        if($status){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+
+    public function contactsDel(Request $request)
+    {
+        $service = new ContactsService();
+        $userData = $request->userData->toArray();
+        list($status,$data) = $service->contactsDel($request->all());
+
+        if($status){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+
+    public function contactsList(Request $request)
+    {
+        $service = new ContactsService();
+        $userData = $request->userData->toArray();
+        list($status,$data) = $service->contactsList($request->all(),$userData);
+
+        if($status){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+
+    public function contactsDetail(Request $request)
+    {
+        $service = new ContactsService();
+        list($status,$data) = $service->contactsDetail($request->all());
+
+        if($status){
+            return $this->json_return(200,'',$data);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+}

+ 34 - 0
app/Http/Controllers/Api/FileUploadController.php

@@ -0,0 +1,34 @@
+<?php
+namespace App\Http\Controllers\Api;
+
+use App\Exports\MyExport;
+use App\Service\FileUploadService;
+use Illuminate\Http\Request;
+
+//文件上传
+class FileUploadController extends BaseController
+{
+    public function uploadFile(Request $request){
+        $service = new FileUploadService();
+        list($status,$data) = $service->uploadFile($request->file('file'));
+
+        if($status){
+            return $this->json_return(200,'上传成功',['url' => $data]);
+        }else{
+            return $this->json_return(201,$data);
+        }
+    }
+
+    //获取文件的位置
+    public function getFile($file_name){
+        $path = storage_path() . "/app/public/upload_files/".$file_name;
+        $ext = '';
+        foreach (FileUploadService::FILE_TYPE as $value){
+            if(file_exists($path. '.' . $value)){
+                $ext = $value;
+            }
+        }
+        if(empty($ext)) return '';
+        return response()->file($path.'.'.$ext);
+    }
+}

+ 13 - 0
app/Model/Contacts.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace App\Model;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Contacts extends Model
+{
+    protected $table = "contacts"; //指定表
+    const CREATED_AT = 'crt_time';
+    const UPDATED_AT = 'upd_time';
+    protected $dateFormat = 'U';
+}

+ 23 - 0
app/Model/ContactsInfo.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Model;
+
+use Illuminate\Database\Eloquent\Model;
+
+class ContactsInfo extends Model
+{
+    protected $table = "contacts_info"; //指定表
+    const CREATED_AT = 'crt_time';
+    const UPDATED_AT = 'upd_time';
+    protected $dateFormat = 'U';
+    const type_one = 1; // 联系方式
+    const type_two = 2; // 关联客户
+    const type_three = 3; // 负责人
+    const type_four = 4; // 协同人
+    public static $type = [
+        self::type_one,
+        self::type_two,
+        self::type_three,
+        self::type_four,
+    ];
+}

+ 313 - 0
app/Service/ContactsService.php

@@ -0,0 +1,313 @@
+<?php
+
+namespace App\Service;
+
+use App\Model\BasicType;
+use App\Model\Contacts;
+use App\Model\ContactsInfo;
+use App\Model\Employee;
+use Illuminate\Support\Facades\DB;
+
+class ContactsService extends Service
+{
+    public function contactsEdit($data,$user){
+        list($status,$msg) = $this->contactsRule($data,false);
+        if(!$status) return [$status,$msg];
+
+        try {
+            DB::beginTransaction();
+
+            $model = Contacts::where('id',$data['id'])->first();
+            $model->title = $data['img'] ?? '';
+            $model->title = $data['title'];
+            $model->mailbox = $data['mailbox'] ?? '';
+            $model->qq = $data['qq'] ?? '';
+            $model->postal_code = $data['postal_code'] ?? '';
+            $model->sex = $data['sex'] ?? '';
+            $model->gregorian_bir = $data['gregorian_bir'] ?? '';
+            $model->lunar_bir = $data['lunar_bir'] ?? '';
+            $model->address1 = $data['address1'] ?? '';
+            $model->address2 = $data['address2'] ?? '';
+            $model->hobby = $data['hobby'] ?? '';
+            $model->mark = $data['mark'] ?? '';
+            $model->importance = $data['importance'] ?? '';
+            $model->intimacy = $data['intimacy'] ?? '';
+            $model->depart = $data['depart'] ?? '';
+            $model->depart_id = $data['depart_id'] ?? '';
+            $model->job = $data['job'] ?? '';
+            $model->decision = $data['decision'] ?? 0;
+            $model->grade = $data['grade'] ?? 0;
+            $model->save();
+
+            $time = time();
+
+            ContactsInfo::where('del_time',0)
+                ->where('contacts_id',$data['id'])
+                ->update(['del_time' => $time]);
+
+            if(! empty($data['contacts'])){
+                $insert = [];
+                foreach ($data['contacts'] as $value){
+                    $insert[] = [
+                        'customer_id' => $model->id,
+                        'contact_type' => $value['id'],
+                        'contact_info' => $value['info'],
+                        'type' => ContactsInfo::type_one,
+                        'crt_time' => $time,
+                    ];
+                }
+                ContactsInfo::insert($insert);
+            }
+
+            if(! empty($data['customers'])){
+                $insert = [];
+                foreach ($data['customers'] as $value){
+                    $insert[] = [
+                        'customer_id' => $model->id,
+                        'employee_id' => $value,
+                        'type' => ContactsInfo::type_two,
+                        'crt_time' => $time,
+                    ];
+                }
+                ContactsInfo::insert($insert);
+            }
+
+            if(! empty($data['employee_one'])){
+                $insert = [];
+                foreach ($data['employee_one'] as $value){
+                    $insert[] = [
+                        'customer_id' => $model->id,
+                        'employee_id' => $value,
+                        'type' => ContactsInfo::type_three,
+                        'crt_time' => $time,
+                    ];
+                }
+                ContactsInfo::insert($insert);
+            }
+
+            if(! empty($data['employee_two'])){
+                $insert = [];
+                foreach ($data['employee_two'] as $value){
+                    $insert[] = [
+                        'customer_id' => $model->id,
+                        'employee_id' => $value,
+                        'type' => ContactsInfo::type_four,
+                        'crt_time' => $time,
+                    ];
+                }
+                ContactsInfo::insert($insert);
+            }
+
+            DB::commit();
+        }catch (\Exception $exception){
+            DB::rollBack();
+            return [false,$exception->getMessage()];
+        }
+
+        return [true,''];
+    }
+
+    public function contactsAdd($data,$user){
+        list($status,$msg) = $this->contactsRule($data);
+        if(!$status) return [$status,$msg];
+
+        try {
+            DB::beginTransaction();
+
+            $model = new Contacts();
+            $model->title = $data['img'] ?? '';
+            $model->title = $data['title'];
+            $model->mailbox = $data['mailbox'] ?? '';
+            $model->qq = $data['qq'] ?? '';
+            $model->postal_code = $data['postal_code'] ?? '';
+            $model->sex = $data['sex'] ?? '';
+            $model->gregorian_bir = $data['gregorian_bir'] ?? '';
+            $model->lunar_bir = $data['lunar_bir'] ?? '';
+            $model->address1 = $data['address1'] ?? '';
+            $model->address2 = $data['address2'] ?? '';
+            $model->hobby = $data['hobby'] ?? '';
+            $model->crt_id = $user['id'];
+            $model->mark = $data['mark'] ?? '';
+            $model->importance = $data['importance'] ?? '';
+            $model->intimacy = $data['intimacy'] ?? '';
+            $model->depart = $data['depart'] ?? '';
+            $model->depart_id = $data['depart_id'] ?? '';
+            $model->job = $data['job'] ?? '';
+            $model->decision = $data['decision'] ?? 0;
+            $model->grade = $data['grade'] ?? 0;
+            $model->save();
+            $time = time();
+
+            if(! empty($data['contacts'])){
+                $insert = [];
+                foreach ($data['contacts'] as $value){
+                    $insert[] = [
+                        'customer_id' => $model->id,
+                        'contact_type' => $value['id'],
+                        'contact_info' => $value['info'],
+                        'type' => ContactsInfo::type_one,
+                        'crt_time' => $time,
+                    ];
+                }
+                ContactsInfo::insert($insert);
+            }
+
+            if(! empty($data['customers'])){
+                $insert = [];
+                foreach ($data['customers'] as $value){
+                    $insert[] = [
+                        'customer_id' => $model->id,
+                        'employee_id' => $value,
+                        'type' => ContactsInfo::type_two,
+                        'crt_time' => $time,
+                    ];
+                }
+                ContactsInfo::insert($insert);
+            }
+
+            if(! empty($data['employee_one'])){
+                $insert = [];
+                foreach ($data['employee_one'] as $value){
+                    $insert[] = [
+                        'customer_id' => $model->id,
+                        'employee_id' => $value,
+                        'type' => ContactsInfo::type_three,
+                        'crt_time' => $time,
+                    ];
+                }
+                ContactsInfo::insert($insert);
+            }
+
+            if(! empty($data['employee_two'])){
+                $insert = [];
+                foreach ($data['employee_two'] as $value){
+                    $insert[] = [
+                        'customer_id' => $model->id,
+                        'employee_id' => $value,
+                        'type' => ContactsInfo::type_four,
+                        'crt_time' => $time,
+                    ];
+                }
+                ContactsInfo::insert($insert);
+            }
+
+            DB::commit();
+        }catch (\Exception $exception){
+            DB::rollBack();
+            return [false,$exception->getMessage()];
+        }
+
+        return [true,''];
+    }
+
+    public function contactsDel($data){
+        if($this->isEmpty($data,'id')) return [false,'请选择数据!'];
+
+        Contacts::whereIn('id',$data['id'])->update([
+            'del_time'=> time()
+        ]);
+        ContactsInfo::where('del_time',0)
+            ->where('contacts_id',$data['id'])
+            ->update(['del_time' => time()]);
+
+        return [true,''];
+    }
+
+    public function contactsDetail($data){
+        if($this->isEmpty($data,'id')) return [false,'请选择数据!'];
+
+        $customer = Contacts::where('del_time',0)
+            ->where('id',$data['id'])
+            ->first();
+        if(empty($customer)) return [false,'联系人不存在或已被删除'];
+        $customer = $customer->toArray();
+        $customer['contacts'] = $customer['customers'] = $customer['employee_one'] = $customer['employee_two'] = [];
+        $array = [
+            $customer['decision'],
+            $customer['grade'],
+        ];
+        $basic_map = BasicType::whereIn('id',$array)
+            ->pluck('title','id')
+            ->toArray();
+        foreach ($customer as $key => $value){
+            $customer[$key]['decision_title'] = $basic_map[$value['decision']] ?? '';
+            $customer[$key]['grade_title'] = $basic_map[$value['grade']] ?? '';
+        }
+
+        $customer_info = ContactsInfo::where('del_time',0)
+            ->where('contacts_id',$customer['id'])
+            ->select('id','contacts_id','contact_type','contact_info','employee_id','type')
+            ->get()->toArray();
+        foreach ($customer_info as $value){
+            if($value['type'] == ContactsInfo::type_one){
+                $customer['contacts'][] = [
+                    'id' => $value['contact_type'],
+                    'info' => $value['contact_info']
+                ];
+            }elseif ($value['type'] == ContactsInfo::type_two){
+                $customer['customers'][] = [
+                    $value['employee_id']
+                ];
+            }elseif ($value['type'] == ContactsInfo::type_three){
+                $customer['employee_one'][] = [
+                    $value['employee_id']
+                ];
+            }elseif ($value['type'] == ContactsInfo::type_four){
+                $customer['employee_two'][] = [
+                    $value['employee_id']
+                ];
+            }
+        }
+
+        return [true, $customer];
+    }
+
+    public function contactsList($data,$user){
+        $model = Contacts::where('del_time',0)
+            ->select('title','id','img','mailbox','qq','postal_code','sex','gregorian_bir','lunar_bir','hobby','address1','address2','crt_id','crt_time','mark','importance','mark','depart','job','decision','grade')
+            ->orderby('id', 'desc');
+
+        if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
+
+        $list = $this->limit($model,'',$data);
+        $list = $this->fillData($list);
+
+        return [true, $list];
+    }
+
+    public function contactsRule($data, $is_add = true){
+        if(empty($data['title'])) return [false,'联系人名不能为空'];
+        if(empty($data['contacts'])) return [false,'联系方式不能为空'];
+        if(empty($data['customers'])) return [false,'关联客户不能为空'];
+        if(empty($data['employee_one'])) return [false,'负责人不能为空'];
+
+        if($is_add){
+
+        }else{
+
+        }
+
+        return [true, $data];
+    }
+
+    public function fillData($data){
+        if(empty($data['data'])) return $data;
+
+        $array = array_unique(array_merge_recursive(array_column($data['data'],'decision'),array_column($data['data'],'grade')));
+        $basic_map = BasicType::whereIn('id',$array)
+            ->pluck('title','id')
+            ->toArray();
+        $emp = Employee::whereIn('id',array_unique(array_column($data['data'],'crt_id')))
+            ->pluck('emp_name','id')
+            ->toArray();
+
+        foreach ($data['data'] as $key => $value){
+            $data['data'][$key]['decision_title'] = $basic_map[$value['decision']] ?? '';
+            $data['data'][$key]['grade_title'] = $basic_map[$value['grade']] ?? '';
+            $data['data'][$key]['crt_time'] = $value['crt_time'] ? date('Y-m-d H:i:s',$value['crt_time']) : '';
+            $data['data'][$key]['crt_name'] = $emp[$value['crt_id']] ?? '';
+        }
+
+        return $data;
+    }
+}

+ 68 - 5
app/Service/CustomerService.php

@@ -5,6 +5,8 @@ namespace App\Service;
 use App\Model\BasicType;
 use App\Model\Customer;
 use App\Model\CustomerInfo;
+use App\Model\Depart;
+use App\Model\Employee;
 use Illuminate\Support\Facades\DB;
 
 class CustomerService extends Service
@@ -28,7 +30,6 @@ class CustomerService extends Service
             $model->progress_stage = $data['progress_stage'] ?? 0;
             $model->address1 = $data['address1'] ?? '';
             $model->address2 = $data['address2'] ?? '';
-            $model->crt_id = $user['id'];
             $model->mark = $data['mark'] ?? '';
             $model->importance = $data['importance'] ?? '';
             $model->company = $data['company'] ?? '';
@@ -272,6 +273,7 @@ class CustomerService extends Service
             ->first();
         if(empty($customer)) return [false,'客户不存在或已被删除'];
         $customer = $customer->toArray();
+        $customer['customer_contact'] = $customer['employee_one'] = $customer['employee_two'] = $customer['employee_three'] = $customer['img'] = $customer['file'] =[];
         $array = [
             $customer['customer_intention'],
             $customer['customer_from'],
@@ -286,6 +288,7 @@ class CustomerService extends Service
         $basic_map = BasicType::whereIn('id',$array)
             ->pluck('title','id')
             ->toArray();
+        $depart_title = Depart::where('id',$customer['depart_id'])->select('title')->value();
         foreach ($customer as $key => $value){
             $customer[$key]['customer_intention_title'] = $basic_map[$value['customer_intention']] ?? '';
             $customer[$key]['customer_from_title'] = $basic_map[$value['customer_from']] ?? '';
@@ -296,6 +299,40 @@ class CustomerService extends Service
             $customer[$key]['state_type_title'] = $basic_map[$value['state_type']] ?? '';
             $customer[$key]['customer_state_title'] = $basic_map[$value['customer_state']] ?? '';
             $customer[$key]['customer_grade_title'] = $basic_map[$value['customer_grade']] ?? '';
+            $customer[$key]['depart_title'] = $depart_title ?? '';
+        }
+
+        $customer_info = CustomerInfo::where('del_time',0)
+            ->where('customer_id',$customer['id'])
+            ->select('id','customer_id','contact_type','contact_info','employee_id','file','type')
+            ->get()->toArray();
+        foreach ($customer_info as $value){
+            if($value['type'] == CustomerInfo::type_one){
+                $customer['customer_contact'][] = [
+                    'id' => $value['contact_type'],
+                    'info' => $value['contact_info']
+                ];
+            }elseif ($value['type'] == CustomerInfo::type_two){
+                $customer['employee_one'][] = [
+                    $value['employee_id']
+                ];
+            }elseif ($value['type'] == CustomerInfo::type_three){
+                $customer['employee_two'][] = [
+                    $value['employee_id']
+                ];
+            }elseif ($value['type'] == CustomerInfo::type_four){
+                $customer['employee_three'][] = [
+                    $value['employee_id']
+                ];
+            }elseif ($value['type'] == CustomerInfo::type_five){
+                $customer['img'][] = [
+                    $value['employee_id']
+                ];
+            }elseif ($value['type'] == CustomerInfo::type_six){
+                $customer['file'][] = [
+                    $value['employee_id']
+                ];
+            }
         }
 
         return [true, $customer];
@@ -303,9 +340,9 @@ class CustomerService extends Service
 
     public function customerList($data,$user){
         $model = Customer::where('del_time',0)
-            ->select('title','id','type')
-            ->orderby('id', 'asc')
-            ->where('type',$data['type']);
+            ->select('title','id','model_type','customer_intention','customer_from','customer_type','car_type','consulting_product','intention_product','progress_stage','address1','address2','crt_id','crt_time','mark','importance','company','company_short_name','depart_id','state_type','customer_state','customer_grade')
+            ->orderby('id', 'desc')
+            ->where('model_type',$data['model_type']);
 
         if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
 
@@ -318,7 +355,7 @@ class CustomerService extends Service
     public function customerRule($data, $is_add = true){
         if(empty($data['model_type'])) return [false,'客户模板类型不能为空'];
         if(! in_array($data['model_type'],Customer::$model_type)) return [false,'客户模板类型错误'];
-        if(empty($data['title'])) return [false,'客户名称错误'];
+        if(empty($data['title'])) return [false,'客户名称不能为空'];
         if($data['model_type'] == Customer::Model_type_one){
             if(empty($data['customer_from'])) return [false,'客户来源不能为空'];
             if(empty($data['customer_type'])) return [false,'客户类别不能为空'];
@@ -351,6 +388,32 @@ class CustomerService extends Service
     public function fillData($data){
         if(empty($data['data'])) return $data;
 
+        $array = array_unique(array_merge_recursive(array_column($data['data'],'customer_intention'),array_column($data['data'],'customer_from'),array_column($data['data'],'customer_type'),array_column($data['data'],'car_type'),array_column($data['data'],'intention_product'),array_column($data['data'],'progress_stage'),array_column($data['data'],'state_type'),array_column($data['data'],'customer_state'),array_column($data['data'],'customer_grade')));
+        $basic_map = BasicType::whereIn('id',$array)
+            ->pluck('title','id')
+            ->toArray();
+        $depart_title = Depart::where('id',array_unique(array_column($data['data'],'depart_id')))
+            ->pluck('title','id')
+            ->toArray();
+        $emp = Employee::whereIn('id',array_unique(array_column($data['data'],'crt_id')))
+            ->pluck('emp_name','id')
+            ->toArray();
+
+        foreach ($data['data'] as $key => $value){
+            $data['data'][$key]['customer_intention_title'] = $basic_map[$value['customer_intention']] ?? '';
+            $data['data'][$key]['customer_from_title'] = $basic_map[$value['customer_from']] ?? '';
+            $data['data'][$key]['customer_type_title'] = $basic_map[$value['customer_type']] ?? '';
+            $data['data'][$key]['car_type_title'] = $basic_map[$value['car_type']] ?? '';
+            $data['data'][$key]['intention_product_title'] = $basic_map[$value['intention_product']] ?? '';
+            $data['data'][$key]['progress_stage_title'] = $basic_map[$value['progress_stage']] ?? '';
+            $data['data'][$key]['state_type_title'] = $basic_map[$value['state_type']] ?? '';
+            $data['data'][$key]['customer_state_title'] = $basic_map[$value['customer_state']] ?? '';
+            $data['data'][$key]['customer_grade_title'] = $basic_map[$value['customer_grade']] ?? '';
+            $data['data'][$key]['depart_title'] = $depart_title[$value['depart_id']] ?? '';
+            $data['data'][$key]['crt_time'] = $value['crt_time'] ? date('Y-m-d H:i:s',$value['crt_time']) : '';
+            $data['data'][$key]['crt_name'] = $emp[$value['crt_id']] ?? '';
+        }
+
         return $data;
     }
 }

+ 43 - 0
app/Service/FileUploadService.php

@@ -0,0 +1,43 @@
+<?php
+
+namespace App\Service;
+
+
+use Illuminate\Support\Facades\Storage;
+
+class FileUploadService extends Service
+{
+    //文件类型
+    const FILE_TYPE = [
+        'txt',
+        'jpg',
+        'png',
+        'gif',
+        'jpeg',
+        'zip',
+        'rar'
+    ];
+
+    public function uploadFile($file){
+        // 获取文件相关信息
+        $ext = $file->getClientOriginalExtension();     // 扩展名
+        $realPath = $file->getRealPath();   //临时文件的绝对路径
+
+        $ext = strtolower($ext);
+        if (! in_array($ext, self::FILE_TYPE)){
+            $str = '文件格式为:';
+            foreach (self::FILE_TYPE as $value){
+                $str.= $value . ' ' ;
+            }
+            return [false,$str];
+        }
+
+        // 上传文件
+        $file_name = time().rand(1000,9999);
+        $filename =  $file_name.'.' . $ext;
+        // 使用我们新建的uploads本地存储空间(目录)
+        Storage::disk('public')->put('upload_files/'.$filename, file_get_contents($realPath));
+
+        return [true, '/api/uploadFiles/'.$file_name];
+    }
+}

+ 13 - 0
routes/api.php

@@ -20,11 +20,17 @@ Route::middleware('auth:api')->get('/user', function (Request $request) {
 Route::any('login', 'Api\LoginController@login');
 Route::any('test', 'Api\TestController@aa');
 Route::any('getHeaderWord', 'Api\HeaderWordController@getHeaderWord');
+//文件获取
+Route::any('uploadFiles/{file_name}', 'Api\FileUploadController@getFile');
+
 Route::group(['middleware'=> ['checkLogin']],function ($route){
     $route->any('getHeaderSetting', 'Api\HeaderWordController@getHeaderSettings');
     $route->any('HeaderSettingsAdd', 'Api\HeaderWordController@add');
     $route->any('HeaderSettingsDetail', 'Api\HeaderWordController@detail');
 
+    //文件上传统一方法
+    $route->any('uploadFile', 'Api\FileUploadController@uploadFile');
+
     $route->any('menuAdd', 'Api\SysMenuController@add');
     $route->any('menuEdit', 'Api\SysMenuController@edit');
     $route->any('menuDel', 'Api\SysMenuController@del');
@@ -76,4 +82,11 @@ Route::group(['middleware'=> ['checkLogin']],function ($route){
     $route->any('customerAdd', 'Api\CustomerController@customerAdd');
     $route->any('customerDel', 'Api\CustomerController@customerDel');
     $route->any('customerDetail', 'Api\CustomerController@customerDetail');
+
+    //联系人
+    $route->any('contactsList', 'Api\ContactsController@contactsList');
+    $route->any('contactsEdit', 'Api\ContactsController@contactsEdit');
+    $route->any('contactsAdd', 'Api\ContactsController@contactsAdd');
+    $route->any('contactsDel', 'Api\ContactsController@contactsDel');
+    $route->any('contactsDetail', 'Api\ContactsController@contactsDetail');
 });