require "stil/gd-text": "^1.1",
class ControllerClass extends Controller
{
public function __invoke($slug)
{
$post = WinkPost::where('slug', $slug)->first();
$quickDip = $post->tags()->whereSlug('quick-dip')->first() ;| <?php | |
| use Illuminate\Notifications\Notification; | |
| use SensitiveParameter; | |
| class MagicLoginLink extends Notification | |
| { | |
| use Queueable; | |
| public function __construct(#[SensitiveParameter] protected string $token) {} |
| <?php | |
| namespace App\Http\Livewire; | |
| use App\Models\Event; | |
| use Livewire\Component; | |
| class EventForm extends Component | |
| { | |
| public $event; |
| 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 |
| CENTRIFUGO=/usr/bin/centrifugo | |
| CENTRIFUGO_ARGS="--config=/etc/centrifugo/config.json --log_file=/var/log/centrifugo.log" | |
| PIDFILE=/var/run/centrifugo.pid | |
| case "$1" in | |
| start) | |
| echo -n "Starting Centrifugo" | |
| start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $CENTRIFUGO -- $CENTRIFUGO_ARGS | |
| echo "." | |
| ;; | |
| stop) |
require "stil/gd-text": "^1.1",
class ControllerClass extends Controller
{
public function __invoke($slug)
{
$post = WinkPost::where('slug', $slug)->first();
$quickDip = $post->tags()->whereSlug('quick-dip')->first() ;| <?php | |
| use Illuminate\Database\Query\Builder; | |
| Builder::macro('orderByNulls', function ($column, $direction = 'asc', $nulls = 'last', $bindings = []) { | |
| $column = $this->getGrammar()->wrap($column); | |
| $direction = strtolower($direction) === 'asc' ? 'asc' : 'desc'; | |
| $nulls = strtolower($nulls) === 'first' ? 'NULLS FIRST' : 'NULLS LAST'; | |
| return $this->orderByRaw("$column $direction $nulls", $bindings); | |
| }); |
| <?php | |
| // Usage: | |
| // Before | |
| @if ($errors->has('email')) | |
| <span>{{ $errors->first('email') }}</span> | |
| @endif | |
| // After: |
| # ================================================ | |
| # PHP 7.2 | |
| # | |
| # See https://www.colinodell.com/blog/201711/installing-php-72 | |
| # ================================================ | |
| apt-get install -y apt-transport-https lsb-release ca-certificates | |
| wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | |
| echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list | |
| apt-get update | |
| apt-get install -y php7.2-cli php7.2-gd php7.2-mbstring php7.2-curl php7.2-xml php7.2-zip |
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Routing\Route; | |
| use Illuminate\Support\ServiceProvider; | |
| use App\Http\Middleware\CaptureRequestExtension; | |
| class AppServiceProvider extends ServiceProvider |