This file contains hidden or 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
{ | |
"definitions": { | |
"Office": { | |
"description": "Office creation schema", | |
"type": "struct", | |
"properties": { | |
"name": { | |
"description": "The name of the office", | |
"type": "string", | |
"minLength": 1, |
This file contains hidden or 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
stages: | |
- build | |
- deploy | |
build_laravel: | |
stage: build | |
image: lorisleiva/laravel-docker:8.2 | |
only: | |
- master | |
script: |
This file contains hidden or 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
stages: | |
- build | |
- deploy | |
build_laravel: | |
stage: build | |
image: lorisleiva/laravel-docker:8.2 | |
only: | |
- master | |
script: |
This file contains hidden or 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 | |
// empties the shopping cart | |
add_action( 'wp_loaded', 'custom_woocommerce_empty_cart_action', 20 ); | |
function custom_woocommerce_empty_cart_action() { | |
if ( isset( $_GET['empty-cart'] ) && 'yes' === esc_html( $_GET['empty-cart'] ) ) { | |
WC()->cart->empty_cart(); | |
} | |
} |
This file contains hidden or 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 | |
// Ensure the script is run from CLI | |
if (php_sapi_name() !== 'cli') { | |
die("This script can only be run from the command line.\n"); | |
} | |
// Check for required CLI arguments | |
if ($argc < 3) { | |
die("Usage: php import_users.php <csv_file> <role>\n"); | |
} |
This file contains hidden or 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\Controllers; | |
use Carbon\Carbon; | |
use App\Models\Plan; | |
use App\Models\User; | |
use App\Models\Payment; | |
use Illuminate\Support\Str; | |
use Illuminate\Http\Request; |
This file contains hidden or 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
# taruk .htaccess untuk protect webhook.php agar hanya terima | |
# trafik daripada Github sahaja. Ini IP address Github yang | |
# akan hantar webhook. | |
# lepas tu sebab webhook.php akan pakai fungsi exec(), lagilah | |
# kita kena protect | |
<Files "webhook.php"> | |
Order Deny,Allow | |
Deny from all |
This file contains hidden or 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
document.addEventListener('DOMContentLoaded', () => { | |
document.getElementById('payment_plan_id').addEventListener('change', (e) => { | |
let today = new Date(); | |
let isoDate = today.toISOString().slice(0, 10); // Get ISO formatted date (YYYY-MM-DD) | |
let amount_input = document.getElementById('amount') | |
let new_expiry_input = document.getElementById('new_expiry') | |
let expiry_input = document.getElementById('expire_on') |
This file contains hidden or 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 Database\Seeders; | |
use App\Models\Country; | |
use Illuminate\Database\Console\Seeds\WithoutModelEvents; | |
use Illuminate\Database\Seeder; | |
class CountrySeeder extends Seeder | |
{ |
This file contains hidden or 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
define ROOT "C:/laragon/www/barberOS" | |
define SITE "barberOS.test" | |
<VirtualHost *:80> | |
DocumentRoot "${ROOT}" | |
ServerName ${SITE} | |
ServerAlias *.${SITE} | |
<Directory "${ROOT}"> | |
AllowOverride All | |
Require all granted |
NewerOlder