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\Console\Commands; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Facades\DB; | |
| use Symfony\Component\Console\Attribute\AsCommand; | |
| #[AsCommand(name: 'db:timestamp-precision')] | |
| class SetTimestampPrecisionCommand extends Command |
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 | |
| $start = hrtime(true); | |
| $mem = memory_get_usage(true); | |
| /** | |
| * Your awesome code her... | |
| */ | |
| echo 'T: ' . number_format((hrtime(true) - $start) / 1_000_000, 2). " s\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
| module.exports = { | |
| 0.5: '0.125rem', // 2px | |
| 1: '0.25rem', // 4px | |
| 1.5: '0.375rem', // 6px | |
| 2: '0.5rem', // 8px | |
| 2.5: '0.625rem', // 10px | |
| 3: '0.75rem', // 12px | |
| 3.5: '0.875rem', // 14px | |
| 4: '1rem', // 16px | |
| 4.5: '1.125rem', // 18px |
PSR-1, 4, and 12 MUST be followed
- PSR-1: Basic Coding Standard: https://www.php-fig.org/psr/psr-1/
- PSR-4: Autoloader: https://www.php-fig.org/psr/psr-4/
- PSR-12: Extended Coding Style: https://www.php-fig.org/psr/psr-12/
Install package via composer
composer require illuminate/database
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\Common\Http; | |
| use Illuminate\Contracts\Foundation\Application; | |
| use Illuminate\Contracts\Routing\ResponseFactory; | |
| use Illuminate\Http\Response; | |
| class JsonResponse extends \Symfony\Component\HttpFoundation\Response | |
| { |
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 | |
| add_filter('woocommerce_email_attachments', function ($attachments, $emailId, $order) { | |
| /* @var WC_Order $order */ | |
| $attachTo = [ | |
| 'new_order', | |
| 'customer_on_hold_order', | |
| 'customer_processing_order', | |
| 'customer_completed_order', | |
| 'customer_refunded_order', |
Create if not exist resources/views/vendor/nova/partials/meta.blade.php
Add your elements in this file:
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/[YOUR-ID].js" crossorigin="anonymous"></script>NewerOlder