<?php
namespace App;
class Item
{
protected float $weight;
protected float $width;
protected float $height;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import { App as AntdApp, ConfigProvider, theme, ThemeConfig } from "antd"; | |
import Cookies from "js-cookie"; | |
import React, { | |
type PropsWithChildren, | |
createContext, | |
useEffect, | |
useState, | |
} from "react"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Support\Facades\Vite; | |
use Illuminate\Support\Str; | |
/** | |
* Simple Content Security Policy middleware. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form-group"> | |
<label>Banner lớn:</label> | |
<div class="row"> | |
<div class="col-md-4"> | |
<div class="card"> | |
<div class="card-img-actions m-1"> | |
<img class="card-img img-fluid" src="/global_assets/images/no-image.jpg" alt="" id="preview_banner"> | |
<div class="card-img-actions-overlay card-img"> | |
<a href="/global_assets/images/no-image.jpg" class="btn btn-outline-white border-2 btn-icon rounded-pill" data-popup="lightbox" data-gallery="gallery1"> | |
<i class="icon-plus3"></i> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const qs = `itemid=${id}&shopid=${shopId}`; | |
const qsHash = crypto.createHash('md5').update(qs).digest('hex'); | |
const none = crypto.createHash('md5').update(`55b03${qsHash}55b03`).digest('hex'); | |
const data = await axios.get(`https://shopee.vn/api/v2/item/get?${qs}`, { | |
headers: { 'if-none-match-': `55b03-${none}` }, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Casts; | |
use Illuminate\Contracts\Database\Eloquent\CastsAttributes; | |
class Money implements CastsAttributes | |
{ | |
/** | |
* @var string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models\Concerns; | |
trait SearchBuilder | |
{ | |
public function scopeSearchBuilder($query) | |
{ | |
if (request()->filled('searchBuilder') && request()->query('searchBuilder') !== 'false') { | |
$query->where(function ($query) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { userAgent } = window.navigator | |
export const isIos = /iPhone|iPad/.test(userAgent) | |
export const isAndroid = /Android/.test(userAgent) | |
export const isMobile = isIos || isAndroid | |
export const isMac = /Mac/.test(userAgent) | |
export const isDesktopSafari = !isMobile && /Safari/.test(userAgent) | |
export const isIosApp = /HEY iOS/.test(userAgent) | |
export const isAndroidApp = /Haystack Android/.test(userAgent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (factory) { | |
if (typeof define === 'function' && define.amd) { | |
// AMD | |
define(['jquery', 'datatables.net', 'datatables.net-editor'], factory); | |
} | |
else if (typeof exports === 'object') { | |
// Node / CommonJS | |
module.exports = function ($, dt) { | |
if (!$) { $ = require('jquery'); } | |
factory($, dt || $.fn.dataTable || require('datatables.net')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class InviteCode | |
* 邀请码生成类 | |
* | |
* ``` | |
* $inviteCode = new InviteCode('123456789'); | |
* var_dump($inviteCode->enCode(1)); // string(8) "00000002" | |
* var_dump($inviteCode->deCode("00000002")); // int(1) |
NewerOlder