问题描述
我试图使我的任务出现在通知部分。我已经设置了任务计划程序(windows10),并且在一个类中有此功能:
公共静态函数ForecastModal($ store_id = NULL) {
$inventory_forecasts = DB::table('restock_inventories',$store_id)
->join('product',function($join){
$join->on('restock_inventories.product_id','=','product.id');
})
->where('product.store_id',$store_id)
->where('product.sku_type','!=','Old Inactive')
->where('restock_inventories.days_of_supply','<',14)
// ->distinct()
->select('product.sku','restock_inventories.days_of_supply')
->groupBy('product.sku')
->paginate(10);
$data = [
'restock_inventories' => $inventory_forecasts
];
Log::info("Matt");
return response()->json($inventory_forecasts);
event(new TaskSchedulesEvents('Days of Supply','Days of Supply',$store_id,Auth::id(),'inventory-forecast-v2/'.$store_id));
}
我尝试将事件放入控制器功能(用于导航栏)中,并且该功能正在运行。出现“供应天数”通知。但是,当我将其放回“通用”文件夹下的“类”中时,它不再起作用。请帮我。谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)