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\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function register() | |
{ |
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 x-data="setupEditor(@entangle($attributes->wire('model')).defer)" x-init="() => init($refs.editor)" wire:ignore | |
{{ $attributes->whereDoesntStartWith('wire:model')->merge(['class' => 'editor !w-full !max-w-full']) }}> | |
<template x-if="editor"> | |
<div class="flex space-x-4 items-center dark:text-neutral-100 fill-current py-2"> | |
<button @click.prevent="Alpine.raw(editor).chain().toggleBold().focus().run()"> | |
<x-icon-bold class="w-4 h-4" /> | |
</button> | |
<button @click.prevent="Alpine.raw(editor).chain().toggleItalic().focus().run()"> | |
<x-icon-italic class="w-4 h-4" /> | |
</button> |
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
public function findSimilarInCategories($categories, $ignore_id) | |
{ | |
$query = $this->createQuery(); | |
// $catUids = []; | |
// foreach ($categories as $category) { | |
// $catUids[] = $category->getUid(); | |
// } |
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
$response = Http::withHeaders([ | |
"X-Auth-Token" => config('services.getresponse.api_key') | |
])->post('https://api.getresponse.com/v3/contacts', [ | |
"name" => $user->name, | |
"email" => $user->email, | |
"campaign" => [ | |
"campaignId" => config('services.getresponse.list_token') | |
] | |
]); |
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
$(document).mouseup(function(e){ | |
var container = $('.topbar .box:visible'); | |
if (!container.is(e.target) && container.has(e.target).length === 0) { | |
container.slideUp(150); | |
} | |
}); |
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
<input type='tel' data-filter='[0-9|+]*' placeholder='123+456'> | |
<input type='tel' data-filter='(\+|(\+[1-9])?[0-9]*)' placeholder='+10123'> | |
<input type='text' data-filter='([A-Z]?|[A-Z][a-z]*)' placeholder='Abcdefg'> | |
<input type='text' data-filter='([A-Z]{0,3}|[A-Z]{3}[0-9]*)' placeholder='ABC123'> | |
--- | |
// Apply filter to all inputs with data-filter: | |
let inputs = document.querySelectorAll('input[data-filter]'); |
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
COMPOSER_MEMORY_LIMIT=-1 composer require author/package |
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
$update = \Stripe\Subscription::update($subscriptionId, [ | |
'billing_cycle_anchor' => 'now', | |
'proration_behavior' => 'always_invoice', | |
'proration_date' => strtotime('tomorrow 00:01'), | |
'default_tax_rates' => [$this->getCorrectTaxRateId($planID)], | |
'cancel_at_period_end' => false, | |
'items' => [ | |
[ | |
'id' => $subscription->items->data[0]->id, | |
'plan' => $planID |
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
> location.main | |
v1 | |
location /blog/ { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $http_host; | |
proxy_pass http://127.0.0.1:2371; |
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
> Usage | |
$recipient = array('[email protected]'); | |
$sender = array('[email protected]' => 'Account'); | |
$subject = 'Hello there'; | |
$templateName = "ThisIsTheExtbaseEmailTemplate"; // .html file | |
$content = array( | |
'firstname' => $postData['first_name'] | |
); |
NewerOlder