- https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes
- https://www.reddit.com/r/laravel/comments/3to60i/50_laravel_tricks/
- 1. Automatic Model Validation
У многих проблема с выводом тегов в фигурных скобках в Fenom MODX, Как обойты? | |
/** @var modX $modx */ | |
switch ($modx->event->name) { | |
case 'pdoToolsOnFenomInit': | |
$fenom->addModifier('ignore', function ($input) use ($modx) { | |
$input = "{ignore}{$input}{/ignore}"; | |
return $input; | |
}); | |
break; |
<?php | |
$stercseo = $modx->getService('stercseo', 'StercSEO', $modx->getOption('stercseo.core_path', null, $modx->getOption('core_path').'components/stercseo/').'model/stercseo/', array()); | |
if (!($stercseo instanceof StercSEO)) { | |
return; | |
} | |
$resources = $modx->getCollection("modResource"); | |
foreach ($resources as $k => $resource) { | |
$properties = $resource->getProperties('stercseo'); | |
if (!empty($properties)) { |
<?php | |
/* | |
* Generate prom.ua catalog | |
* | |
* @url https://support.prom.ua/hc/ru/articles/360004960817 | |
* @create CrazyBoy49z | |
* @date 06.05.2020 | |
*/ | |
$func = function ($value) { |
<?php | |
/** | |
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
* | |
* You may also want a list of unofficial codes: | |
* | |
* 103 => 'Checkpoint', | |
* 218 => 'This is fine', // Apache Web Server | |
* 419 => 'Page Expired', // Laravel Framework |
<div id="container"> | |
<!-- Edit the letter attr to: N, E, T, F, L, I or X --> | |
<netflixintro letter="N"> | |
<div class="helper-1"> | |
<div class="effect-brush"> | |
<span class="fur-31"></span> | |
<span class="fur-30"></span> | |
<span class="fur-29"></span> | |
<span class="fur-28"></span> | |
<span class="fur-27"></span> |
<div id="app"> | |
<div id="hero"> | |
<h1>NEON<br/>CURSOR</h1> | |
</div> | |
</div> |
server { | |
listen 80; | |
server_name app.rehanmanzoor.me; | |
charset utf-8; | |
client_max_body_size 1M; | |
location / { | |
proxy_pass http://127.0.0.1:8001; | |
proxy_http_version 1.1; |