// webpack.mix.js
const mix = require('laravel-mix')
const path = require('path')
// ...
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ruleset name="Laravel"> | |
| <description>The default PHP Code Style of my Laravel projects.</description> | |
| <!-- Files to include. --> | |
| <file>app</file> | |
| <file>config</file> | |
| <file>routes</file> | |
| <file>tests</file> |
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 Tests; | |
| use Tests\Authenticated; | |
| use Illuminate\Support\Facades\Auth; | |
| use Illuminate\Foundation\Testing\RefreshDatabase; | |
| class ArticleUpdateTest extends TestCase | |
| { |
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 | |
| abstract class Node {} | |
| class Calculator extends Node { | |
| public function __construct(public array $statements){} | |
| } | |
| class Add extends Node { | |
| public function __construct(public Node $left, public Node $right){} |
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
| import { watchEffect } from "vue" | |
| export const useAutoresizeTextarea = (element) => { | |
| const resizeTextarea = () => { | |
| element.value.style.height = 'auto' | |
| element.value.style.height = element.value.scrollHeight + 'px' | |
| } | |
| watchEffect(onInvalidate => { | |
| if (! element.value) return |
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
| export default { | |
| props: { | |
| stripe: { | |
| type: String, | |
| required: true, | |
| }, | |
| options: { | |
| type: Object, | |
| required: true, | |
| } |
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
| <script setup> | |
| import { ref, toRefs, computed } from 'vue' | |
| import { useWorkspace } from '@/composables' | |
| import TweetFormUpdate from './TweetFormUpdate' | |
| const props = defineProps({ | |
| tweet: Object, | |
| }) | |
| const { tweet } = toRefs(props) |
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
| // resources/js/services/Form.js | |
| import FormErrors from './FormErrors' | |
| export default class { | |
| constructor (initialData = {}, submitCallback = null) { | |
| this._initialData = initialData | |
| this._submitCallback = submitCallback | |
| this.errors = new FormErrors() |
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 | |
| // Nodes. | |
| abstract class Node implements Visitable {} | |
| class Number extends Node { | |
| public function __construct(public float $value){} | |
| public function accept(Visitor $visitor) { | |
| return $visitor->visitNumber($this); | |
| } |
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
| export function pipeline(initialValue, pipes, then) { | |
| then = then ?? ((t) => t); | |
| const pipelineCallback = pipes | |
| .slice() | |
| .reverse() | |
| .reduce((next, pipe) => (passable) => pipe(passable, next), then); | |
| return pipelineCallback(initialValue); | |
| } |
OlderNewer