perfectboook

1403 经验值

不刷新的情况下只能通过js来改变吧。document.title='sth.';

恩恩,公司走不开,明年找个新工作,应该就好些了。

最近看了教主的restful api系列视频,群里有很多人提了个问题,如何自定义实现返回值,官方文档里有说明,但是不是很具体,这里再废话一下参照[官方文档](https://github.com/dingo/api/wiki/Transformers)return $this->collection($users, new UserTransformer, function ($resource,

版本控制是怎么传递的v1,v2,我在header和body中传递怎么没有反应? $api = app('Dingo\Api\Routing\Router');$api->version('v1', function ($api) { $api->post('/register','App\Http\Controllers\MyController@register'); });$api->vers

$input = '[ { "table_name": "dp", "field_name": "dpcryptfeat", "field_col_num": "6" }, { "table_name": "dp", "field_name": "dppath", "field_col_num": "4" }, { "table_name": "dp", "field_name": "dpauthfeat", "field_col_num": "5" }, { "table_name": "dp", "field_name": "dpnick", "field_col_num": "3" }, { "table_name": "icc", "field_name": "iccbufsizeprot", "field_col_num": "13" }, { "table_name": "icc", "field_name": "iccmech", "field_col_num": "5" }, { "table_name": "icc", "field_name": "iccnick", "field_col_num": "3" }, { "table_name": "icc", "field_name": "iccprocmanager", "field_col_num": "8" }, { "table_name": "icc", "field_name": "iccdesc", "field_col_num": "4" }, { "table_name": "icc", "field_name": "iccprot", "field_col_num": "6" }, { "table_name": "icc", "field_name": "iccformatprot", "field_col_num": "14" } ]';

dd(collect(json_decode($input))->groupBy('table_name')->map(function($item){
    return collect($item)->sortBy('field_col_num')->map(function($data) {
        return $data->field_name;
    })->values();
})->toJson());

哈哈,忍不住试也下。。

搞了个粗制版的代码:https://jsfiddle.net/perfectboook/pjLpgpL8/ 。你要的应该是这样的效果吧。不要吐槽我的代码。。。

我一般都是再写一条get的路由来使用。当然如果是ajax的话,delete直接在ajax里面设置就可以。

$.ajax({
    type:'DELETE',
    url: '...'
   ....
});

这样。

$data = [
    [
        "group" => "A",
        "list" => [
            ["name" => "1"],
            ["name" => "2"],
            ["name" => "3"],
        ]
    ],
    [
        "group" => "B",
        "list" => [
            ["name" => "4"],
            ["name" => "5"],
            ["name" => "6"],
        ]
    ]
];
dd(collect($data)->flatMap(function ($data) {
    return collect($data['list'])->map(function ($item) use ($data) {
        return ['group' => $data['group'], 'name' => $item['name']];
    });
})->toArray());

其实差不多。

只要Route::get('doctorInfo','IndexController@doctorInfo');就可以,后面加不加?=和路由这边没有关系。在controller里面,你可以用$request->get('id');来获取.