Skip to content

Instantly share code, notes, and snippets.

View JeffreyWay's full-sized avatar

Jeffrey Way JeffreyWay

View GitHub Profile
@JeffreyWay
JeffreyWay / AssignmentList.js
Last active June 25, 2023 06:03
Learn Vue 3: Step By Step, Episode 14, More Flexible Components With Slots and Flags - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/14
import Assignment from "./Assignment.js";
import AssignmentTags from "./AssignmentTags.js";
export default {
components: { Assignment, AssignmentTags },
template: `
<section v-show="assignments.length" class="w-60">
<div class="flex justify-between items-start">
<h2 class="font-bold mb-2">
@JeffreyWay
JeffreyWay / Assignments.js
Last active May 13, 2022 17:49
Learn Vue 3: Step By Step, Episode 13 - Lifecycle Hooks, Fake APIs, and AJAX - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/13
import AssignmentList from "./AssignmentList.js";
import AssignmentCreate from "./AssignmentCreate.js";
export default {
components: { AssignmentList, AssignmentCreate },
template: `
<section class="space-y-6">
<assignment-list :assignments="filters.inProgress" title="In Progress"></assignment-list>
<assignment-list :assignments="filters.completed" title="Completed"></assignment-list>
@JeffreyWay
JeffreyWay / AssignmentList.js
Last active May 12, 2022 20:02
Learn Vue 3: Step By Step, Episode 12 - A Deeper Look at V-Model - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/12
import Assignment from "./Assignment.js";
import AssignmentTags from "./AssignmentTags.js";
export default {
components: { Assignment, AssignmentTags },
template: `
<section v-show="assignments.length">
<h2 class="font-bold mb-2">
{{ title }}
@JeffreyWay
JeffreyWay / index.php
Last active May 11, 2022 15:40
Larabit - Gambler's Ruin Illustrated With PHP -https://laracasts.com/series/jeffreys-larabits/episodes/26
<?php
class Player {
public function __construct(public string $name, public int $pennies)
{
//
}
public function givePenny(Player $p2): void
{
@JeffreyWay
JeffreyWay / AssignmentList.js
Last active November 10, 2022 13:02
Learn Vue 3: Step by Step, Episode 10 - It's All So Easy - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/10
import Assignment from "./Assignment.js";
export default {
components: { Assignment },
template: `
<section v-show="assignments.length">
<h2 class="font-bold mb-2">
{{ title }}
<span>({{ assignments.length }})</span>
@JeffreyWay
JeffreyWay / App.js
Last active September 25, 2023 13:54
Learn Vue 3: Step by Step, Episode 9, Parent-Child State Communication - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/9
import Assignments from "./Assignments.js";
export default {
components: { Assignments },
template: `
<assignments></assignments>
`,
}
@JeffreyWay
JeffreyWay / App.js
Last active April 17, 2023 15:01
Learn Vue 3: Step By Step, Episode 7, Bring it All Together - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/7
import Assignments from "./Assignments.js";
export default {
components: { Assignments },
template: `
<assignments></assignments>
`,
}
@JeffreyWay
JeffreyWay / App.js
Created May 2, 2022 17:07
Learn Vue 3, Step by Step - Episode 6, Component Props
import AppButton from "./AppButton.js";
export default {
components: {
'app-button': AppButton
}
};
@JeffreyWay
JeffreyWay / AppButton.js
Last active May 26, 2022 16:50
Learn Vue: Step by Step, Episode 4, One Vue Component Per File - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/5
export default {
template: `
<button class="bg-gray-200 hover:bg-gray-400 border rounded px-5 py-2 disabled:cursor-not-allowed" :disabled="processing">
<slot />
</button>
`,
data() {
return {
processing: true
@JeffreyWay
JeffreyWay / index.html
Last active May 26, 2022 16:50
Learn Vue 3: Step by Step - Episode 3, Your First Custom Vue Component - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/4
<!doctype html>
<html lang="en" class="h-full">
<head>
<meta charset="UTF-8">
<title>Episode 4: Your First Custom Vue Component</title>
<script src="https://unpkg.com/vue@3"></script>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="h-full grid place-items-center">