سلام من یه دستور دارم به این صورت
   public function delivery()
    {
        $userId = \request()->input('userId');
        $random = \request()->input('random');
        $user = User::findOrFail($userId);
        $sellerProduct = SellerProduct::where('product_id', 7)->where('user_id', $user->id)->firstOrFail();
        if (!$sellerProduct) {
            return 'is null';
        }
        return $sellerProduct;
    }
مشکل اینجاست که اگه متغییر sellerProduct چیزی رو برنگردونه اون is null رو بر نمیگردونه و به جاش میره خطای page not found رو میده
کافیه به جای متد firstOrFail از متد first استفاده کنید
$sellerProduct = SellerProduct::where('product_id', 7)->where('user_id', $user->id)->first();
                                آیا مایل به ارسال نوتیفیکیشن و اخبار از طرف راکت هستید ؟