Display PHP errors
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);| <template> | |
| <span :title="humanFriendlyDate">{{ diffForHumans }}</span> | |
| </template> | |
| <script> | |
| import dayjs from "dayjs"; | |
| import relativeTime from "dayjs/plugin/relativeTime"; | |
| import localizedDate from "dayjs/plugin/localizedFormat"; | |
| import tr from "dayjs/locale/tr"; | |
| dayjs.extend(relativeTime); |
| <?php | |
| /** | |
| * File: wp-config.php | |
| * | |
| * Enable WordPress debug only for your IP address | |
| * | |
| * Once you know your IP address you can edit your wp-config.php file and edit the WP_DEBUG constant and replace it with this function and your IP address. | |
| * | |
| * NOTE: If you re-boot your router and have a dynamic IP address you will need to update your IP address in wp-config.php | |
| */ |
| export const h=(t,p,...c)=>({t,p,c,k:p&&p.key}) | |
| export const render=(e,d,t=d.t||(d.t={}),p,r,c,m,y)=> | |
| // arrays | |
| e.map?e.map((e,p)=>render(e,d,t.o&&t.o[p])): | |
| // components | |
| e.t.call?(e.i=render((render.c=e).t(Object.assign({children:e.c},e.p),e.s=t.s||{},t=> | |
| render(Object.assign(e.s,t)&&e,d,e)),t.i||d,t&&t.i||{}),d.t=t=e):( | |
| // create notes | |
| m=t.d||(e.t?document.createElement(e.t):new Text(e.p)), | |
| // diff props |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.html$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.html [L] | |
| </IfModule> | |
| https://router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations |
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| use Laravel\Lumen\Routing\Controller as BaseController; | |
| class Controller extends BaseController | |
| { | |
| public function uploadImage(Request $request) |
| //Orders | |
| wc_get_account_endpoint_url( get_option( 'woocommerce_myaccount_orders_endpoint', 'orders' ) ); | |
| //Downloads | |
| wc_get_account_endpoint_url( get_option( 'woocommerce_myaccount_downloads_endpoint', 'downloads' ) ); | |
| //Edit Address | |
| wc_get_account_endpoint_url( get_option( 'woocommerce_myaccount_edit_address_endpoint', 'edit-address' ) ); | |
| //Payment Methods |
| import { cacheAdapterEnhancer } from 'axios-extensions' | |
| import LRUCache from 'lru-cache' | |
| const ONE_HOUR = 1000 * 60 * 60 | |
| const defaultCache = new LRUCache({ maxAge: ONE_HOUR }) | |
| export default function ({ $axios }) { | |
| const defaults = $axios.defaults | |
| // https://github.com/kuitos/axios-extensions | |
| defaults.adapter = cacheAdapterEnhancer(defaults.adapter, { |
pm2 start artisan --name laravel-worker --interpreter php -- queue:work --daemon
https://hazaveh.net/2018/01/run-and-monitor-laravel-queue-using-pm2/