Skip to content

Instantly share code, notes, and snippets.

View phuclh's full-sized avatar
🏠
Working from home

LE PHUC H phuclh

🏠
Working from home
  • Puyallup, WA
View GitHub Profile
@phuclh
phuclh / BaseEnum.php
Last active September 17, 2021 21:11
abstract class BaseEnum
{
protected static array $options = [];
public static function options(): array
{
if (count(static::$options)) {
return static::$options;
}
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class ESign extends Component
{
public $signature;
<select id="payment_method" class="w-full form-control form-select"
v-model="payment_method">
<option value="Credit Card">Credit Card</option>
<option value="COD">COD</option>
</select>
data() {
return {
payment_method: 'Credit Card'
select * from `users` []
select `tasks`.*, `task_user`.`user_id` as `pivot_user_id`, `task_user`.`task_id` as `pivot_task_id`, `task_user`.`campaign_id` as `pivot_campaign_id` from `tasks` inner join `task_user` on `tasks`.`id` = `task_user`.`task_id` where `task_user`.`user_id` in (1, 2) and `end_at` >= ? and not exists (select * from `appraisals` where `tasks`.`id` = `appraisals`.`task_id`) or exists (select * from `appraisals` where `tasks`.`id` = `appraisals`.`task_id` and `percent` != ?) ["2020-02-07",100]
select `users`.*, `task_user`.`task_id` as `pivot_task_id`, `task_user`.`user_id` as `pivot_user_id`, `task_user`.`campaign_id` as `pivot_campaign_id` from `users` inner join `task_user` on `users`.`id` = `task_user`.`user_id` where `task_user`.`task_id` in (12, 13) []
select * from `campaigns` where `campaigns`.`id` in (2) []
select `users`.*, `campaign_user`.`campaign_id` as `pivot_campaign_id`, `campaign_user`.`user_id` as `pivot_user_id` from `users` inner join `campaign_user` on `users`.`id` = `ca
$order = Order::find(62);
$products = [];
foreach ($order->orderItems as $orderItem)
{
$products[] = (object) [
'sku' => $orderItem->sku,
'name' => $orderItem->name,
'price' => $orderItem->price,
'weight' => $orderItem->weight,
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]>
<html dir="ltr" lang="en" class="ie8"><![endif]-->
<!--[if IE 9 ]>
<html dir="ltr" lang="en" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="ltr" class="ltr" lang="en">
<!--<![endif]-->
<head>
<?php
$array = [];
$excludeItems = [];
if(isset($exclude) && !empty($exclude)) $excludeItems = array_map('trim', explode(',', $exclude));
if (count($excludeItems)) $array['post__not_in'] = $excludeItems;
?>
$arrival = new DateTime(date('Y-m-d', strtotime($arrival)));
$departure = new DateTime(date('Y-m-d', strtotime($departure)));
$apartment = Cart::contents();
$apartment = reset($apartment);
$days = $arrival == $departure ? $days = 1 : $departure->diff($arrival)->format("%a");
$total = 0;
for ($i = 0; $i < $days; $i++)
@extends('frontend.layouts.default')
@section('title', 'Nhóm dịch: ' . $team->name . ' | ')
@section('content')
<div class="row">
<div class="col-md-12">
<div class="m-box clearfix">
<div style="background-image: url('{{ $team->present()->getCover }}')" class="cover"></div>
<div class="overlay">
@foreach ($mangas as $manga)
<li class="clearfix">
<div class="name">
<a href="{{ route('mangas.single', [$manga->id, $manga->slug]) }}" title="{{ $manga->name }}" class="text-ellipsis">{{ $manga->name }} {{ $manga->present()->icon }}</a>
</div>
<div class="chapter">
<a href="{{ $manga->present()->chapterUrl() }}" title="{{ $manga->chapters->last()->name }}" class="text-ellipsis">{{ $manga->chapters->last()->name }}</a>
</div>
</li>
@endforeach