ShippingCostRulerController.php
1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
namespace App\Http\Controllers;
use App\Model\ShippingCostRulerModel;
use Illuminate\Http\Request;
class ShippingCostRulerController extends Controller
{
public function info(Request $request, $id = '')
{
{
if ($request->path() == '/') {
$path = 'web/index';
} else {
$path = $request->path();
}
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'user_email' => $request->user->email,
'uri' => '/' . $path,
'id' => $id,
];
return $this->$id($request);
}
}
public function __call($name, $arr)
{
$data['errinfo'] = '访问路径错误';
return view('errors.error', $data);
}
//保存采购备注
public function SaveShippingCostRuler($request)
{
$id = $request->get('id');
if (!empty($id)) {
$model = new ShippingCostRulerModel();
$ruler = $model->where('id', $id)->first()->toArray();
$this->data['ruler'] = $ruler;
}
$this->data['title'] = '保存采购备注';
$this->data['view'] = 'SaveShippingCostRuler';
return $this->view('保存采购备注');
}
}