改装项
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
namespace app\common\controller;
|
||||
|
||||
use app\common\traits\crud\CrudControllerTrait;
|
||||
use app\admin\service\VehModificationService;
|
||||
|
||||
class VehModificationController extends BaseController
|
||||
{
|
||||
use CrudControllerTrait;
|
||||
|
||||
protected $service;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->service = new VehModificationService();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表页数据格式化
|
||||
*
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
protected function indexFormat($data)
|
||||
{
|
||||
if (isset($data['created_at']))
|
||||
$data['created_at'] = date('Y-m-d H:i:s', $data['created_at']);
|
||||
if (isset($data['updated_at']))
|
||||
$data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']);
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据格式化
|
||||
*
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
protected function showFormat($data)
|
||||
{
|
||||
if (isset($data['created_at']))
|
||||
$data['created_at'] = date('Y-m-d H:i:s', $data['created_at']);
|
||||
if (isset($data['updated_at']))
|
||||
$data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']);
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@@ -417,4 +417,13 @@ Route::group('/crm', function () {
|
||||
Route::any('/destroy', [app\common\controller\VehVehicleSkuController::class, 'destroy']);
|
||||
});
|
||||
});
|
||||
|
||||
// 汽车改装项目
|
||||
Route::group('/modification', function () {
|
||||
Route::any('/list', [app\common\controller\VehModificationController::class, 'index']);
|
||||
Route::any('/show', [app\common\controller\VehModificationController::class, 'show']);
|
||||
Route::any('/store', [app\common\controller\VehModificationController::class, 'store']);
|
||||
Route::any('/update', [app\common\controller\VehModificationController::class, 'update']);
|
||||
Route::any('/destroy', [app\common\controller\VehModificationController::class, 'destroy']);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user