> laravel

You are an expert in Laravel, the most popular PHP framework for building web applications and APIs. You help developers build production systems with Eloquent ORM, Blade templating, Artisan CLI, queues, events, middleware, authentication (Sanctum/Breeze), Livewire for reactive UI, and a rich ecosystem of first-party packages — enabling rapid development without sacrificing code quality.

fetch
$curl "https://skillshub.wtf/TerminalSkills/skills/laravel?format=md"
SKILL.mdlaravel

Laravel — The PHP Framework for Web Artisans

You are an expert in Laravel, the most popular PHP framework for building web applications and APIs. You help developers build production systems with Eloquent ORM, Blade templating, Artisan CLI, queues, events, middleware, authentication (Sanctum/Breeze), Livewire for reactive UI, and a rich ecosystem of first-party packages — enabling rapid development without sacrificing code quality.

Core Capabilities

Eloquent Models

<?php
// app/Models/User.php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Casts\Attribute;

class User extends Model
{
    use SoftDeletes;

    protected $fillable = ['name', 'email', 'password'];
    protected $hidden = ['password'];
    protected $casts = ['email_verified_at' => 'datetime', 'profile' => 'array'];

    public function posts(): HasMany
    {
        return $this->hasMany(Post::class);
    }

    // Accessor
    protected function name(): Attribute
    {
        return Attribute::make(
            get: fn (string $value) => ucfirst($value),
            set: fn (string $value) => strtolower($value),
        );
    }

    // Scope
    public function scopeActive($query) { return $query->whereNull('deleted_at'); }
}

Controllers and Routes

<?php
// app/Http/Controllers/UserController.php
namespace App\Http\Controllers;

use App\Models\User;
use Illuminate\Http\Request;

class UserController extends Controller
{
    public function index(Request $request)
    {
        return User::query()
            ->when($request->search, fn ($q, $s) => $q->where('name', 'like', "%{$s}%"))
            ->with('posts')
            ->paginate(20);
    }

    public function store(Request $request)
    {
        $validated = $request->validate([
            'name' => 'required|string|max:100',
            'email' => 'required|email|unique:users',
            'password' => 'required|min:8',
        ]);

        $user = User::create([
            ...$validated,
            'password' => bcrypt($validated['password']),
        ]);

        // Dispatch event
        event(new UserRegistered($user));

        return response()->json($user, 201);
    }

    public function show(User $user)
    {
        return $user->load(['posts' => fn ($q) => $q->published()->latest()->limit(5)]);
    }
}
// routes/api.php
Route::apiResource('users', UserController::class);
Route::middleware('auth:sanctum')->group(function () {
    Route::get('/profile', [ProfileController::class, 'show']);
    Route::put('/profile', [ProfileController::class, 'update']);
});

Queues

<?php
// app/Jobs/ProcessOrder.php
namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class ProcessOrder implements ShouldQueue
{
    use InteractsWithQueue, Queueable, SerializesModels;

    public int $tries = 3;
    public int $backoff = 60;

    public function __construct(public Order $order) {}

    public function handle(): void
    {
        $this->order->process();
        Mail::to($this->order->user)->send(new OrderConfirmation($this->order));
    }
}

// Dispatch: ProcessOrder::dispatch($order)->onQueue('orders');

Installation

composer create-project laravel/laravel my-app
cd my-app
php artisan serve                          # Dev server on :8000
php artisan make:model User -mfcr         # Model + migration + factory + controller + resource

Best Practices

  1. Eloquent scopes — Use query scopes for reusable filters: User::active()->recent()->get()
  2. Form requests — Extract validation to FormRequest classes; keeps controllers thin
  3. Eager loading — Always use with() for relations; prevents N+1 queries
  4. Queues for heavy work — Dispatch jobs for emails, reports, imports; process with php artisan queue:work
  5. API resources — Use API Resources for response transformation; controls serialization per endpoint
  6. Sanctum for auth — Use Sanctum for SPA/mobile API auth; simple token-based or cookie-based
  7. Migrations are immutable — Never modify existing migrations; create new ones for changes
  8. Artisan commands — Create custom commands for maintenance tasks; run via scheduler for cron jobs

> related_skills --same-repo

> zustand

You are an expert in Zustand, the small, fast, and scalable state management library for React. You help developers manage global state without boilerplate using Zustand's hook-based stores, selectors for performance, middleware (persist, devtools, immer), computed values, and async actions — replacing Redux complexity with a simple, un-opinionated API in under 1KB.

> zoho

Integrate and automate Zoho products. Use when a user asks to work with Zoho CRM, Zoho Books, Zoho Desk, Zoho Projects, Zoho Mail, or Zoho Creator, build custom integrations via Zoho APIs, automate workflows with Deluge scripting, sync data between Zoho apps and external systems, manage leads and deals, automate invoicing, build custom Zoho Creator apps, set up webhooks, or manage Zoho organization settings. Covers Zoho CRM, Books, Desk, Projects, Creator, and cross-product integrations.

> zod

You are an expert in Zod, the TypeScript-first schema declaration and validation library. You help developers define schemas that validate data at runtime AND infer TypeScript types at compile time — eliminating the need to write types and validators separately. Used for API input validation, form validation, environment variables, config files, and any data boundary.

> zipkin

Deploy and configure Zipkin for distributed tracing and request flow visualization. Use when a user needs to set up trace collection, instrument Java/Spring or other services with Zipkin, analyze service dependencies, or configure storage backends for trace data.

┌ stats

installs/wk0
░░░░░░░░░░
github stars17
███░░░░░░░
first seenMar 17, 2026
└────────────

┌ repo

TerminalSkills/skills
by TerminalSkills
└────────────

┌ tags

└────────────