- Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
- EventCentric.Core - Event Sourcing and CQRS in PHP
- LiteCQRS - Small convention based CQRS library for PHP
- predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
- ProophEventSourcing - Provides basic functionality for event-sourced aggregates
- ProophEventStore - PHP 5.4+ EventStore Implementation
- ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
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
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 |
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
/* [Dashboards compatíveis com requirejs] | |
Solução componente a componente | |
-------------------------------------------------------------------- | |
Colocar no Post Execution: | |
*/ | |
function(){ | |
var comp = this, elm = $("#"+comp.htmlObject); | |
$(window).resize(function(){ | |
comp.chart.options.width = elm.width(); | |
comp.chart.render(/*bypassAnimation*/true, /*recreate*/true, /*reload*/false); |
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 | |
use App\Channel; | |
use App\Http\Controllers\BotManController; | |
use BotMan\BotMan\Drivers\DriverManager; | |
use BotMan\Drivers\Slack\SlackDriver; | |
use BotMan\Drivers\Slack\SlackRTMDriver; | |
use BotMan\Drivers\Telegram\TelegramDriver; | |
use BotMan\Drivers\Web\WebDriver; | |
$botman = resolve('botman'); |
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
/* | |
Create SLUG from a string | |
This function rewrite the string prototype and also | |
replace latin and other special characters. | |
Forked by Gabriel Froes - https://gist.github.com/gabrielfroes | |
Original Author: Mathew Byrne - https://gist.github.com/mathewbyrne/1280286 | |
*/ | |
if (!String.prototype.slugify) { | |
String.prototype.slugify = function () { |
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 | |
$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> |
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 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'); |
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.
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\Console; | |
use App\Console\Commands\StopQueueListeners; | |
use Illuminate\Console\Scheduling\Schedule; | |
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | |
class Kernel extends ConsoleKernel | |
{ |
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
var maps = require("@google/maps"); | |
var client = maps.createClient({ | |
key: "AIzaSyCSA6hgjkJhkvwO7OP9dG230uEP0ryFXns" | |
}); | |
function generateDateTime(hour, minutes) { | |
var d = new Date(); | |
d.setHours(hour,minutes,0,0); | |
d.setDate(d.getDate() + 1); |