CashShopAll.php 772 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Models\User;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class CashShopAll extends Model
  6. {
  7. protected $connection = "User";
  8. protected $table = "Table_CashShopAll";
  9. protected $fillable =
  10. [
  11. "RecId","LinkItemID", "Sale", "SellType", "Price",
  12. "Count", "Category", "strItemName", "strItemDesc", "GiftCheck",
  13. "RubyCost", "CashCost", "Period"
  14. ];
  15. public $timestamps = false;
  16. public static function GetProduct($product_no)
  17. {
  18. $product = self::whereIn('RecId', array($product_no))->get(['LinkItemID','Price','Count']);
  19. if($product){
  20. return $product;
  21. }
  22. return null;
  23. }
  24. }