Skip to content

Instantly share code, notes, and snippets.

<?php
namespace Tests;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\ValidationException;
use Illuminate\Validation\Validator;
use Symfony\Component\HttpFoundation\ParameterBag;
use function PHPUnit\Framework\assertFalse;
@reinink
reinink / query.sql
Last active November 14, 2023 11:08
Text search across multiple tables using MySQL
select
first_name,
last_name
from
users
left join
companies on companies.id = users.company_id
where (
companies.name like 'TERM%' or
first_name like 'TERM%' or
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@Ariel-Rodriguez
Ariel-Rodriguez / semver.sh
Last active June 9, 2023 22:00
semver compare tool in bash
#!/bin/bash
# THIS IS AN OBSOLETE SCRIPT WITH BUGS. FOR UPDATED VERSIONS PLEASE CHECK https://github.com/Ariel-Rodriguez/sh-semversion-2
###
# semantic version comparition using semver specification http://semver.org/
# This bash script compares pre-releases alphabetically as well
#
# returns 1 when A greater than B
# returns 0 when A equals B