Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

Building a game with PHP and Laravel Livewire

15.4K views
•
April 18, 2023
by
PHP Annotated
YouTube video player
Building a game with PHP and Laravel Livewire

TL;DR

The video showcases how a PHP programmer builds a Mahjong game using the Livewire library, eliminating the need for JavaScript.

Transcript

I built a game with PHP. My wife likes to play Mahjong,  but existing websites are really   crappy and buggy. So I decided to  build it for her, from scratch. Now, I’m a PHP programmer, and I like to  stick with what I’m comfortable with. So   I looked into Livewire: a library  that abstracts away all JavaScript,   and allows me to write my game  l... Read More

Key Insights

  • 👾 Livewire allows PHP programmers to build interactive games without writing JavaScript, simplifying game development.
  • 💨 The Livewire library abstracts away server requests and automatically updates the DOM based on HTML tags, reducing the complexity of client-side interactions.
  • 👾 By using PHP and Livewire, the developer was able to build a Mahjong game with various features such as selecting tiles, pair detection, hint functionality, board shuffling, and victory detection.
  • 👾 The developer plans to continue improving the game, adding more features such as improved design, keyboard shortcuts, seed-based shuffling, and alternative game modes.
  • 🎮 The video showcases the power and potential of Livewire in game development, emphasizing the ease of use for PHP programmers.
  • 🏛️ The demonstration highlights the ability to build complex game logic using PHP classes and interact with the Livewire library for seamless backend functionality.
  • 🎮 The developer encourages viewer feedback for future improvements and commits to making a follow-up video if the current video reaches 400 likes.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: How does Livewire simplify game development for PHP programmers?

Livewire abstracts away JavaScript, allowing PHP programmers to write game logic in PHP and automatically handling server requests and DOM updates.

Q: What classes are used to model the Mahjong game logic?

The Tile class contains position, value, and state information, while the Board class represents a collection of tiles and game state.

Q: How are clickable tiles implemented in the game?

The board class determines whether a specific tile is clickable using the canSelect method, preventing selection of unclickable tiles.

Q: What additional features does the game developer plan to add?

The developer plans to implement functionality such as shuffling the board, custom board shapes, hints, resetting the board, detecting victory, adding keyboard shortcuts, and introducing a game variation with increasing difficulty.

Key Insights:

  • Livewire allows PHP programmers to build interactive games without writing JavaScript, simplifying game development.
  • The Livewire library abstracts away server requests and automatically updates the DOM based on HTML tags, reducing the complexity of client-side interactions.
  • By using PHP and Livewire, the developer was able to build a Mahjong game with various features such as selecting tiles, pair detection, hint functionality, board shuffling, and victory detection.
  • The developer plans to continue improving the game, adding more features such as improved design, keyboard shortcuts, seed-based shuffling, and alternative game modes.
  • The video showcases the power and potential of Livewire in game development, emphasizing the ease of use for PHP programmers.
  • The demonstration highlights the ability to build complex game logic using PHP classes and interact with the Livewire library for seamless backend functionality.
  • The developer encourages viewer feedback for future improvements and commits to making a follow-up video if the current video reaches 400 likes.
  • Livewire proves to be a viable alternative for PHP developers who prefer to stick with their comfort zone and avoid extensive JavaScript coding.

Summary & Key Takeaways

  • The video demonstrates how to use Livewire, a PHP library, to build a Mahjong game without the need for JavaScript.

  • Livewire automatically handles server requests and updates the DOM based on HTML tags.

  • The video covers the setup process, implementing game logic, handling events, and persisting game state.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.