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
/* | |
Получение товаров по параметрам фильтров. | |
В пределах одного родителя между параметрами "или". Между родителями "и". | |
Модель ProductFilter ('product_id', 'category_id', 'filter_id', 'filter_item_id') | |
https://github.com/DmitrySkibitsky | |
*/ | |
/** | |
* @param $filters // Коллекция с filter_item_id |
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
C:\Users\MyUser\Downloads\beanstalkd-1.4.6-cygwin\bin\beanstalkd.exe -l 127.0.0.1 -p 11300 |
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
Попробуйте наше новое меню — с {{ customer.address and customer.address.city == 'Санкт-Петербург' ? 'шавермой' : 'шаурмой' }} ... |
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 | |
$string = 'Hello, {name}. Welcome to {country}'; | |
$patterns = []; | |
$patterns[0] = '/{name}/'; | |
$patterns[1] = '/{country}/'; | |
$replacements = []; | |
$replacements[0] = 'Nick'; |
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
window.onload = function() { | |
// Parse the URL | |
function getParameterByName(name) { | |
var name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"); | |
var results = regex.exec(location.search); | |
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
} | |
// Give the URL parameters variable names | |
var source = getParameterByName('utm_source'); |
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 | |
/** | |
* Turn all URLs in clickable links. | |
* | |
* @param string $value | |
* @param array $protocols http/https, ftp, mail, twitter | |
* @param array $attributes | |
* @param string $mode normal or all | |
* @return string | |
*/ |
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
в методе \App\Providers\AppServiceProviderregister(). | |
/** | |
* Register any application services. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
// ... |
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
public function render($request, Exception $exception) | |
{ | |
if($exception instanceof \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException){ | |
return abort('404'); | |
} | |
return parent::render($request, $exception); | |
} |
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
if (! function_exists('is_array_same_order')) { | |
/** | |
* It checks the order of the array element by orienting itself on the original array. | |
* | |
* @param array $same | |
* @param array $original | |
* | |
* @return bool | |
*/ | |
function is_array_same_order(array $same, array $original) |
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\Http\Requests; | |
use Illuminate\Foundation\Http\FormRequest as BaseFormRequest; | |
abstract class FormRequest extends BaseFormRequest | |
{ | |
protected $prepared; |