Skip to content

Instantly share code, notes, and snippets.

View JeffreyWay's full-sized avatar

Jeffrey Way JeffreyWay

View GitHub Profile
<x-layout>
<x-section>
<x-tabs active="First">
<x-tab name="First">
First content goes here.
</x-tab>
<x-tab name="Second">
Second content goes here.
</x-tab>
<div class="bg-gray-200 p-4 rounded block relative">
<h2 class="font-bold">
<a href="https://laracasts.com/discuss/channels/laravel">
Laravel
<span class="absolute inset-0"></span>
</a>
</h2>
<p class="mt-3">
A web application framework with expressive, elegant syntax.
<?php
// Connect to the MySQL database.
$dsn = "mysql:host=localhost;port=3306;dbname=myapp;user=root;charset=utf8mb4";
// Tip: This should be wrapped in a try-catch. We'll learn how, soon.
$pdo = new PDO($dsn);
$statement = $pdo->prepare("select * from posts where id = 1");
$statement->execute();
@JeffreyWay
JeffreyWay / AssignmentList.js
Last active November 2, 2025 17:12
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 / homework-solution.php
Created September 29, 2022 17:36
PHP for Beginners, Episode 9 - Lambdas and Flexibility
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<?php
$books = [
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<?php
$movies = [
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<?php
$books = [
@JeffreyWay
JeffreyWay / homework-solution.php
Last active October 26, 2025 07:34
PHP For Beginners, Episode 6 - Arrays
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<?php
$usernames = [
@JeffreyWay
JeffreyWay / homework-solution.php
Last active October 26, 2025 07:31
PHP For Beginners, Episode 5 - Conditionals and Booleans
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<h1>
<?= 'Hello World' ?>
</h1>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<h1>
<?php