Skip to content

Commit 43d6859

Browse files
committed
update
1 parent c4d1378 commit 43d6859

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/Http/Resources/SellerResource.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
namespace App\Http\Resources;
44

55
use App\Models\Shop;
6+
use App\Models\FeedBack;
7+
use App\Models\Notification;
68
use Illuminate\Http\Request;
9+
use Illuminate\Support\Facades\URL;
710
use App\Http\Resources\ShopResource;
811
use Illuminate\Http\Resources\Json\JsonResource;
9-
use Illuminate\Support\Facades\URL;
12+
1013
class SellerResource extends JsonResource
1114
{
1215
/**
@@ -33,6 +36,7 @@ public function toArray(Request $request): array
3336
"identity_card_with_the_person"=>URL("/storage/".$this->identity_card_with_the_person),
3437
"isSeller"=>$this->isSeller,
3538
"feedbacks"=>$this->feedbacks,
39+
"last_feedbacks_product_verification"=>FeedBack::where('user_id',$this->id)->where('type','1')->where('status',0)->count(),
3640
"shop"=>ShopResource::make(Shop::where('user_id',$this->id)->first()),
3741
"created_at"=>$this->created_at
3842
];

app/Notifications/NewMessageFromVerificationProductNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function toDatabase($notifiable)
4141
return [
4242
"product_id" => $this->product->id,
4343
'feedback' => $this->message,
44-
'message' => 'Vous aviez recu un nouveau message suite à la verification de votre produit',
44+
'message' => "Votre produit" . $this->product->product_name . "à été rejeté veuillez consultez votre boite de notification pour avoir plus de details",
4545
];
4646
}
4747

0 commit comments

Comments
 (0)