Raw SQL
SELECT
users.name AS staff,
facilities.name AS facility
FROM
users
<?php | |
/** | |
* Antes de começar, adicione as possibilidades de | |
* upsell pela página: https://admin.appmax.com.br/my-upsell | |
* | |
* No campo "URL página de Upsell" preencha sua | |
* URL no formato: site.com.br/este-arquivo.php?order_bundle_id={order_bundle_id} | |
* | |
* Obviamente você pode colocar outros parâmetros, | |
* mas seguindo este modelo é obrigatório configurar |
Magento 2 Debugging Tricks - MySQL Query, fetchAll, fetchRow, Data Hydrate & PHP xDebug by Matheus Gontijo | |
Video: https://www.youtube.com/watch?v=xLf3OwpAFhQ | |
----------------------------------------------- | |
1) Track MySQL queries | |
vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php::query | |
vendor/magento/zendframework1/library/Zend/Db/Select.php |
<?php | |
// php cluter-quick-check --host <host> --port <port> [--auth password] | |
function panicAbort($str_msg) { | |
fprintf(STDERR, "Error: $str_msg\n\n"); | |
$bt = debug_backtrace(); | |
fprintf(STDERR, "--- BACKTRACE ---\n"); | |
foreach (debug_backtrace() as $frame => $frame_info) { |
public function index(Request $request) | |
{ | |
$sortBy = 'id'; | |
$orderBy = 'desc'; | |
$perPage = 20; | |
$q = null; | |
if ($request->has('orderBy')) $orderBy = $request->query('orderBy'); | |
if ($request->has('sortBy')) $sortBy = $request->query('sortBy'); | |
if ($request->has('perPage')) $perPage = $request->query('perPage'); |
<?php declare(strict_types=1); | |
require_once __DIR__.'/vendor/autoload.php'; | |
use Symfony\Component\Process\Process; | |
$process = new Process(['php', 'index.php']); | |
echo "Starting process\n"; | |
$process->start(); |
var request = require('request'); | |
const bitcoin = require('bitcoinjs-lib'); | |
var buffer = require('buffer'); | |
const bitcoinNetwork = bitcoin.networks.testnet; | |
var rootUrl = "https://api.blockcypher.com/v1/btc/test3"; | |
//create wallets | |
const TestNet = bitcoin.networks.testnet3; |
The Laravel explination, shown below is confusing.
Facades provide a "static" interface to classes that are available in the application's service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.
Many examples use Cache::get('key')
to demonstrate how a Facade works. Comparing the following code to the utility that a Facade provides.
@php | |
$d = $d ?? null; // default value | |
@endphp | |
<div class="form-group row"> | |
<label for="{{ $n }}" class="col-sm-4 col-form-label text-md-right"><b>{{ $l }}</b></label> | |
<div class="col-md-8"> | |
<input id="{{ $n }}" type="checkbox" class="form-control" name="{{ $n }}" value="1" @if(old($n, $d) == '1') checked @endif> | |
@if ($errors->has($n)) | |
<small class="text-danger">{{ $errors->first($n) }}</small> |