GLM-5.1 takes 20 minutes to build Laravel project with mixed results

AI Coding Daily////3 min read

Project Architecture and Model Comparison

Building a Laravel project from a single prompt requires an AI model to handle complex dependency management and architectural consistency. In a head-to-head evaluation, GLM-5.1 attempted to construct a checklist application with PDF export capabilities using the Livewire starter kit. While it successfully delivered a functional application, the 20-minute execution time revealed significant friction compared to Claude 3.5 Opus (often referred to in context as Opus 4.6), which completed a more refined version in just six minutes. The disparity highlights a gap in how different LLMs internalize modern PHP ecosystems and UI libraries.

GLM-5.1 takes 20 minutes to build Laravel project with mixed results
I Tried NEW GLM-5.1 on a Longer Task (compared to Opus 4.6)

Prerequisites and Tech Stack

To replicate this automated build process, developers should be familiar with the following:

  • PHP 8.x and Laravel Framework: Understanding of MVC patterns and routing.
  • Livewire 4: Knowledge of full-stack components and single-file component syntax.
  • Flux UI: Familiarity with the official Laravel UI library for modern components.
  • Open Router: A unified API interface used to access GLM-5.1 within VS Code.

Debugging the Flux UI Bottleneck

GLM-5.1 struggled primarily with Flux UI syntax. It repeatedly hallucinated component names, such as clipboard-check, and failed to recognize that the correct variant attribute for buttons is outline, not outlined. This led to a recursive "loop of failure" where the agent ran automated tests, failed, and attempted to fix the code blindly.

// Hallucinated Flux Syntax
<flux:radio label="Yes" />

// Corrected implementation after multiple failures
<flux:select label="Choose Response">
    <option value="yes">Yes</option>
</flux:select>

Code Quality and Performance Optimization

A deep dive into the generated code reveals that while GLM-5.1 produces working software, it misses critical optimizations. A review by Claude identified an N+1 query issue in the dashboard view. Instead of loading only the count of items, the model loaded entire collections into memory.

// Inefficient: Loads all items just to count them
$checklists = Checklist::with('items')->get();

// Recommended: Uses database-level counting
$checklists = Checklist::withCount('items')->get();

Final Verdict on Agentic Capabilities

GLM-5.1 demonstrates impressive stamina for long-horizon tasks, remaining stable over 16 distinct task items. However, its lack of specific training on the latest Flux UI documentation resulted in a $2.15 cost per run on OpenRouter due to high token usage during debugging. For developers seeking efficiency, Claude remains the superior choice for high-fidelity UI and performance-first Laravel development.

Topic DensityMention share of the most discussed topics · 19 mentions across 12 distinct topics
GLM-5.1
26%· products
Claude
11%· products
Flux UI
11%· products
Laravel
11%· products
Anthropic
5%· companies
Other topics
37%
End of Article
Source video
GLM-5.1 takes 20 minutes to build Laravel project with mixed results

I Tried NEW GLM-5.1 on a Longer Task (compared to Opus 4.6)

Watch

AI Coding Daily // 13:21

This channel is not for vibe-coders. It's for professional devs who want to use AI as powerful assistant, while still keeping the control of their codebase. My name is Povilas Korop, and I'm passionate about coding with AI. So I started this THIRD YouTube channel, in addition to my other ones Laravel Daily and Filament Daily. You will see a lot of my experiments with AI: I will try new things and share my discoveries along the way.

What they talk about
AI and Agentic Coding News
Who and what they mention most
Laravel
36.5%27
Anthropic
16.2%12
Filament
13.5%10
PHP
9.5%7
3 min read0%
3 min read