We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controller: public function shoppabletags($id){ app('debugbar')->disable(); $user= Auth::user(); $shop = Shop::where('user_id', $user->id)->where('shop_tariffs', '>=', 3)->first(); $module = Modules::where('shop_id', $shop->shop_id)->where('module_type', 1)->first(); $link = json_decode($module->module_feautures); if($id == $link->link) { $category = Category::where('shop_id', $shop->shop_id)->with('goods')->get(); $csvExporter = new Export(); $csvExporter->build($category, ['goods.goods_id' => 'id','goods.goods_name' => 'title','goods.goods_link' => 'link','goods.goods_main_photo' => 'image_link','goods.goods_availability' => 'availability', 1 => 'inventory','goods.goods_amount' => 'price','goods.goods_about' => 'description','goods.goods_condition' => 'condition'])->download(); } }
model: public function goods() { return $this->hasMany(Goods::class, 'category_id', 'category_id'); }
Specifying the bundle according to the table, but not output the records in CSV, can you tell me?
The text was updated successfully, but these errors were encountered:
Controller- https://pastebin.com/w5ynrXgM model - https://pastebin.com/qkGjsEiT
Sorry, something went wrong.
The file that is generated is empty
@VoronVoronov If you dump $category do you get your expected result? If not, what error do you get?
$category
No branches or pull requests
Controller:
public function shoppabletags($id){
app('debugbar')->disable();
$user= Auth::user();
$shop = Shop::where('user_id', $user->id)->where('shop_tariffs', '>=', 3)->first();
$module = Modules::where('shop_id', $shop->shop_id)->where('module_type', 1)->first();
$link = json_decode($module->module_feautures);
if($id == $link->link) {
$category = Category::where('shop_id', $shop->shop_id)->with('goods')->get();
$csvExporter = new Export();
$csvExporter->build($category, ['goods.goods_id' => 'id','goods.goods_name' => 'title','goods.goods_link' => 'link','goods.goods_main_photo' => 'image_link','goods.goods_availability' => 'availability', 1 => 'inventory','goods.goods_amount' => 'price','goods.goods_about' => 'description','goods.goods_condition' => 'condition'])->download();
}
}
model:
public function goods()
{
return $this->hasMany(Goods::class, 'category_id', 'category_id');
}
Specifying the bundle according to the table, but not output the records in CSV, can you tell me?
The text was updated successfully, but these errors were encountered: