dope2008

4451 经验值

这个模拟器是什么软件??苹果的

dd(collect($list)->pluck('email','name'));
dd(collect($list)->lists('email','name'));

$collection = collect([

['product' => 'Desk', 'price' => 200],
['product' => 'Chair', 'price' => 100],
['product' => 'Bookcase', 'price' => 150],
['product' => 'Door', 'price' => 100],

]);

$filtered = $collection->where('price', '>',100);

$filtered->all();

不能where 大于什么的吗?如果我实现怎么办

Validator::extend('multiple', function ($attribute, $value, $parameters) {    
  if ((int)($value  % $parameters[0])) {        
    return false;    
  }    
return true;
}, ':attribute必须是');



我想提示语是这样的,比如验证是8的倍数时。提示语是


':attribute必须是'.$parameters[0].'倍数

set_time_limit(0);
$list = TraceKeyword::select(DB::raw('keyword,sum(pv) as pv,sum(uv) as uv,sum(ip) as ip,sum(reg) as reg'))
->groupBy('keyword')    
->orderBy('uv', 'desc')
->get();

$newList[] = [    '关健字', 'PV', 'UV', 'IP', '报名人数', '转换率'];
foreach ($list as $item) {    
  $newList[] = [        
    str_replace('=', '', $item->keyword),        
    $item->pv,        
    $item->uv,        
    $item->ip,        
    $item->reg,        
    percentageRatio($item->reg, $item->uv)    
  ];
}
\Excel::create('搜索词信息-' . Carbon::now()->toDateString(), function ($excel) use ($newList) {    
  $excel->sheet('keyword', function ($sheet) use ($newList) {        
    $sheet->rows($newList);    
  });
})->download('xlsx');


导出约1万条,还是可以。但是超级一万就出错了,有什么优代方案吗?

@JellyBool 我知道,但是我批量入库,有时会出现这个问题

 做api接口的,有时候出现

SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge'

是什么问题呢?

[2016-06-23 01:05:58] local.ERROR: exception 'ErrorException' with message 'file_put_contents(/data/www/operate/storage/framework/cache/db/13/db137b150629648c2faa340de41256492a2476ea): failed to open stream: No such file or directory' in /data/www/operate/vendor/illuminate/filesystem/Filesystem.php:109
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/data/www/opera...', 109, Array)
#1 /data/www/operate/vendor/illuminate/filesystem/Filesystem.php(109): file_put_contents('/data/www/opera...', '1466615218i:146...', 2)
#2 /data/www/operate/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php(106): Illuminate\Filesystem\Filesystem->put('/data/www/opera...', '1466615218i:146...', true)
#3 /data/www/operate/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(206): Illuminate\Cache\FileStore->put('defebbe5f1bc93e...', 1466615218, 1)
#4 /data/www/operate/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(253): Illuminate\Cache\Repository->put('defebbe5f1bc93e...', 1466615218, 1)
#5 /data/www/operate/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php(42): Illuminate\Cache\Repository->add('defebbe5f1bc93e...', 1466615218, '1')
#6 /data/www/operate/vendor/illuminate/routing/Middleware/ThrottleRequests.php(42): Illuminate\Cache\RateLimiter->tooManyAttempts('defebbe5f1bc93e...', '1000', '1')
#7 [internal function]: Illuminate\Routing\Middleware\ThrottleRequests->handle(Object(Illuminate\Http\Request), Object(Closure), '1000', '1')
#8 /data/www/operate/vendor/illuminate/pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#9 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#10 /data/www/operate/vendor/illuminate/routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#11 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#12 /data/www/operate/vendor/illuminate/pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#13 /data/www/operate/vendor/illuminate/routing/Router.php(726): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#14 /data/www/operate/vendor/illuminate/routing/Router.php(699): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#15 /data/www/operate/vendor/illuminate/routing/Router.php(675): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#16 /data/www/operate/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(246): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#17 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#18 /data/www/operate/vendor/illuminate/routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#19 /data/www/operate/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#20 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#21 /data/www/operate/vendor/illuminate/pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#22 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 /data/www/operate/vendor/illuminate/routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#24 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#25 /data/www/operate/vendor/illuminate/pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#26 /data/www/operate/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#27 /data/www/operate/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(99): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#28 /data/www/operate/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#29 {main}  



这样的数据,看不懂。 有人可以解释一下是什么问题吗??

批量退款接口,能不能做重新支付功能。

就是说用户 退款。管理员全选确定,然后到了支付宝。。然后把支付宝关了,

这这能不能重新打开?