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
<html> | |
<head> | |
<style> | |
.box-that-changes-color { | |
height: 1rem; | |
width: 1rem; | |
background: red; | |
} | |
@media (min-width: 768px) { |
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
import {Controller} from '@hotwired/stimulus' | |
import {Editor} from "@tiptap/core" | |
import {Mention} from "@tiptap/extension-mention"; | |
import StarterKit from "@tiptap/starter-kit" | |
export default class extends Controller { | |
static targets = ['input', 'suggestions'] | |
connect() { | |
this.editor = new Editor({ |
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 Tests\SetupTraits; | |
trait SetupTraits | |
{ | |
protected function setUpTraits() | |
{ | |
$this->setupAdditionalTraits( | |
parent::setUpTraits() |
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 | |
protected function invalidJson($request, ValidationException $exception) | |
{ | |
return response()->json([ | |
'message' => $exception->getMessage(), | |
'errors' => Collection::make($exception->errors())->mapWithKeys(function ($value, $key) { | |
return [Str::camel($key) => $value]; | |
}), | |
], $exception->status); |
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; | |
use Illuminate\Support\Traits\ForwardsCalls; | |
class HigherOrderIfProxy | |
{ | |
use ForwardsCalls; |
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 Illuminate\Database\Eloquent\Builder; | |
protected function registerWhereLikeMacro() | |
{ | |
Builder::macro('whereLike', function ($attributes, $searchTerm = null) { | |
$this->where(function (Builder $query) use ($attributes, $searchTerm) { | |
foreach (array_wrap($attributes) as $attribute) { | |
$query->when( |
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; | |
trait Tappable | |
{ | |
public function tap($callback) | |
{ | |
return tap($this, $callback); | |
} |
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; | |
trait HasPersonName | |
{ | |
public function getNameAttribute($name) | |
{ | |
return new PersonName($name); |
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
FROM elixir:latest | |
RUN mix local.hex --force | |
RUN mix local.rebar --force | |
RUN mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez --force | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - | |
RUN apt-get update && apt-get install -y postgresql-client inotify-tools nodejs | |
RUN mkdir /app |
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
function phpv() { | |
brew unlink php$(php -v | head -n1 | grep -o -E '\d\.\d' | tr -d '.') | |
brew link php$1 | |
valet restart | |
} |
NewerOlder