Sadique Ali

404 posts

Sadique Ali banner
Sadique Ali

Sadique Ali

@apnahive

Full-Stack Dev | #Laravel & Vue.js Expert | Building SaaS tools & sharing tips @laravelphp Free Laravel Trends Guide → https://t.co/Mvr4LGRY8C

Jhansi, Uttar Pradesh Katılım Eylül 2021
2.4K Takip Edilen370 Takipçiler
Sabitlenmiş Tweet
Sadique Ali
Sadique Ali@apnahive·
Following @apnahive = ✅ Daily Laravel tips ✅ Performance + database best practices ✅ Freelancing & SaaS lessons from real projects If you’re a dev or founder building with Laravel/JS, you’re in the right place. 👇
English
1
2
11
1.5K
Sadique Ali
Sadique Ali@apnahive·
Pint v1.23.0 ships three improvements. One composer update, meaningfully faster for humans and agents alike. 1. --PARALLEL (the big one) vendor/bin/pint --parallel Pint now uses PHP CS Fixer's parallel runner, distributing file processing across all CPU cores simultaneously. Benchmarks on real codebases: • Small < 100 files: ~3s → ~2s (minimal gain) • Medium 100–500 files: ~15s → ~3s (~5×) • Large 500–2,000 files: ~4 min → ~10s (~24×) • Huge 2,000+ files: ~12 min → ~18s (~40×) The flag is marked Experimental. For most codebases it's stable. If you hit edge cases, fall back to serial. My recommended workflow: vendor/bin/pint --parallel --dirty # just changed files, sub-second vendor/bin/pint --parallel --test # CI mode, no writes, exit 1 if anything changes 2. --FORMAT AGENT vendor/bin/pint --format agent Default Pint output is for humans: coloured dots, ANSI codes, formatted summaries. Useless to an AI agent — it wastes context window and requires stripping escape codes before parsing. --format agent outputs structured JSON: { "files": [ {"path": "...Invoice.php", "status": "fail", "diff": "--- ..."} ], "summary": {"total": 48, "passed": 47, "failed": 1} } "status": "pass" or "fail" — no inferring from formatted text. The diff is included directly — agent sees exactly what changed. ANSI-free — fraction of the context window cost. This flag is auto-used when Pint runs inside Claude Code or OpenCode. No config needed. 3. EXTEND CONFIG // pint.json { "extend": "../org/pint-base.json", "rules": { "declare_strict_types": true } } Share a base config across all your projects. Override per-project. Update the base once, all projects pick it up. composer update laravel/pint -w Full guide with CI setup, pre-commit hooks, monorepo patterns, and the timing table — linked here. #Laravel #PHP #Pint #CodeStyle #DeveloperTools #AI #WebDevelopment medium.com/p/pint-now-run…
English
0
1
4
138
Sadique Ali
Sadique Ali@apnahive·
Laravel added Http::batch()->defer(). One method that changes the economics of external API calls. The problem: You place an order. Your app calls the inventory API, payment gateway, and warehouse API. The user waits for all three before seeing the confirmation page — even though none of that work affects what they see. BEFORE (sequential): reserve inventory → 200ms charge payment → 250ms notify warehouse → 180ms → response: 630ms total User stares at a spinner for work that doesn’t affect their page. AFTER (Http::batch()->defer()): → response: ~0ms (instant redirect) [inventory + payment + warehouse + analytics] All four run concurrently AFTER the response is sent. The code: Http::batch(fn (Batch $batch) => [ $batch->post('/api/inventory/reserve', …), $batch->post('/api/payments/charge', …), $batch->post('/api/warehouse/notify', …), ]) ->then(function (Batch $batch, array $results) use ($order) { $order->update(['status' => 'confirmed']); Mail::to($order->user)->send(new OrderConfirmed($order)); }) ->catch(function (Batch $batch, string $key, $response) { Log::error("Batch failure: {$key}"); }) ->defer(); // ← fires after response is sent. User is already on the next page. Three things to know: 1. No queue worker. No Redis. No job dispatching overhead. 2. Full batch lifecycle callbacks: then() catch() finally() — all available with defer. 3. Also in L13: Http::pool() now defaults concurrency to 2 (was null = serial). Silent footgun fixed. The four-pattern decision hierarchy: → User needs results — Http::pool() or Http::batch() (during request) → User doesn’t need results, HTTP — Http::batch()->defer() → User doesn’t need results, closures — Concurrency::defer() → Heavy work needing serialization — ->onConnection('deferred') or ->onConnection('background') Full guide with production checkout example and testing patterns — linked here. #Laravel #Laravel13 #PHP #WebDevelopment #Performance medium.com/p/laravels-htt…
English
0
1
38
3.2K
Sadique Ali retweetledi
Taylor Otwell
Taylor Otwell@taylorotwell·
New Laravel apps now ship with support for Vite 8. ⚡
English
11
22
459
30.5K
Sadique Ali
Sadique Ali@apnahive·
Laravel 13 is out. Today — March 17, 2026. Announced by Taylor Otwell at Laracon EU. Zero breaking changes. Here's everything that shipped: 1. PHP ATTRIBUTES ON MODELS #[Table('invoices')] #[Fillable('name', 'amount')] #[Connection('billing')] 9 attributes replace the protected $ property wall. Optional, non-breaking, backward compatible. Works on models, commands, listeners, mailables, and broadcast events. 2. LARAVEL AI SDK — NOW STABLE php artisan make:agent InvoiceAnalyst --structured 6 providers (OpenAI, Anthropic, Gemini, Groq, xAI, Ollama), provider failover, streaming, structured output, conversation memory, schema-matched test fakes. Stable release on the same day as L13. 3. PASSKEYS NATIVE Features::passkeys() — one line in Fortify config. Face ID, Touch ID, Windows Hello, YubiKey. No packages. Starter kits scaffold the full passkey flow. Private key never leaves the device. 4. REVERB DATABASE DRIVER REVERB_SCALING_DRIVER=database Horizontal WebSocket scaling without Redis. MySQL or PostgreSQL coordinates your Reverb instances. Already in your stack. 5. CACHE::TOUCH() Cache::touch('key', now()->addHour()) Extend a cache entry's TTL without re-fetching its value. 6. TEAMS IN STARTER KITS Multi-tenant team scaffolding built into the framework. No Spark. No Jetstream. Optional at install time. Upgrade from Laravel 12: - PHP 8.3+ required (only hard requirement) - composer require laravel/framework:^13.0 - Official upgrade guide estimates under 10 minutes for most apps Full breakdown with before/after code for every feature — linked here. #Laravel #Laravel13 #PHP #WebDevelopment #LaraconEU medium.com/p/laravel-13-i…
English
1
2
42
3.9K
dxrkside
dxrkside@dxrrrkside·
@apnahive Was teams feature added like in Jetstream? Taylor mentioned it will be included in starterkits during Laracon
English
1
0
2
187
Sadique Ali
Sadique Ali@apnahive·
Laravel 13 ships passkeys natively. Face ID, fingerprint, hardware keys — no third-party packages, no stored passwords. Here's how it works and why it matters. Passkeys work via two ceremonies: ATTESTATION (Registration): 1. Server sends a challenge + your domain (RP ID) + user ID 2. Browser asks device to generate a public/private key pair 3. Private key is stored in hardware. It NEVER leaves the device. 4. Public key + signed challenge → your server 5. Server stores the public key. That's it. ASSERTION (Authentication): 1. Server sends a new random challenge 2. Browser asks device to sign it 3. User does Face ID / fingerprint / PIN 4. Signed challenge → server 5. Server verifies with the stored public key. User is in. What you give up with passwords: ❌ Phishable — fake domains steal them ❌ Reused across services — one breach cascades ❌ Stored server-side — breach exposes hashes ❌ Forgotten — resets, support tickets ❌ Brute-forceable — rate limits required What you gain with passkeys: ✅ Phishing-proof — cryptographically bound to your exact domain ✅ Not reusable — per-site, per-device credentials ✅ No server secret — only public keys stored ✅ No resets — biometric = always remembered ✅ Replay-proof — sign_count prevents assertion reuse Setup in Laravel 13 — new apps: // config/fortify.php Features::passkeys(), // one line // starter kit scaffolds everything else Setup for existing apps: Spatie’s laravel-passkeys package + `HasPasskeys` trait + PASSKEYS_RELYING_PARTY_ID=yourdomain.com Two honest caveats: ⚠️ Requires HTTPS (localhost is exempt for dev) ⚠️ Device loss = can't log in. Always keep a fallback + encourage multiple device registration. Full guide — both setup paths, complete frontend code, the five-step migration strategy from passwords to passkeys — linked here. #Laravel #Laravel13 #Passkeys #WebAuthn #Security #PHP #WebDevelopment medium.com/p/i-ditched-pa…
English
2
17
167
9.4K
Sadique Ali retweetledi
Laravel
Laravel@laravelphp·
Laravel 13 is here. This update focuses on AI-native workflows, stronger defaults, and more expressive developer APIs. If you're running Laravel 12 or higher you can run /upgrade in Laravel Boost and have your agent upgrade your app for you.
English
37
197
1K
64.7K
Sadique Ali
Sadique Ali@apnahive·
No, we can use it without spatie package, however for it we need to code all functionality which is available on the package. On the other hand, if your app is working on old, meaning you have already done for the functionality, so you can simply migrate with spatie package. Now for the new applications which you build you can ease your task by just simply call the package for doing hard work
English
0
0
1
426
Mathieu Céraline
Mathieu Céraline@mathcrln·
@apnahive So the only path for old apps is through spatie? No way to progressively migrate the scaffolding with fortify?
English
1
0
2
500
Sadique Ali
Sadique Ali@apnahive·
Laravel 13 adds a database driver for Reverb. You no longer need Redis to scale WebSockets horizontally. The problem it solves: Laravel Reverb is the first-party WebSocket server. To run more than one Reverb instance behind a load balancer, Laravel 12 required Redis as a pub/sub message broker between those instances. No Redis, no horizontal scaling. Full stop. For teams already running Redis for queues and cache, that's fine. For everyone else — managed hosting, VPS setups, teams who don't want another service to provision — it was a real barrier. Laravel 13 removes it. The change: // config/reverb.php 'scaling' => [ 'enabled' => true, 'driver' => 'database', // new in Laravel 13 ], // .env REVERB_SCALING_ENABLED=true REVERB_SCALING_DRIVER=database # No REDIS_HOST needed Your MySQL or PostgreSQL database handles the pub/sub coordination between Reverb instances. It's already in your stack. It's already backed up. Your team already understands it. When to use the database driver: ✓ No Redis in your current stack ✓ Managed / shared hosting environment ✓ Fewer than ~500 concurrent WebSocket connections ✓ You want fewer moving parts in production When to still use Redis: → Already running Redis for queues or cache (use it — it's free) → High-frequency broadcasts (>50/sec) → 1,000+ concurrent WebSocket connections The honest caveat: Redis uses native push semantics and is faster at high volume. The database driver uses polling. For most applications, the latency difference is imperceptible. For high-throughput apps, benchmark first. Full guide — complete Reverb setup from scratch, channel types, Nginx proxy config, Supervisor process management, and the decision table — linked here. #Laravel #Laravel13 #WebSockets #PHP #RealTime #WebDevelopment medium.com/p/laravel-13-a…
English
3
12
123
10.4K
Sadique Ali
Sadique Ali@apnahive·
PHP 8.4 property hooks look like Eloquent accessors. They are not the same thing. Using one where you need the other silently breaks your app. Here's the rule that makes it all click: Eloquent uses __get() and __set() magic methods to intercept property access. Every time you read $user->name, it goes through Eloquent's attribute pipeline: __get() → $attributes['name'] → accessor → return. PHP 8.4 property hooks operate at the language level, before magic methods. When you declare: public string $name { get => ucwords($this->name); } ...on an Eloquent model, PHP creates a real class property called $name. Eloquent's __get() only fires for properties that don't exist on the class. Now that $name is declared, Eloquent never sees it. The value bypasses $attributes[] entirely. Result: $user->save() doesn't persist it. $user->toArray() doesn't include it. Nothing in Eloquent's pipeline touches it. This is not a bug. It's a boundary. The correct split: For DB-backed attributes → use Eloquent Attribute::make(): protected function name(): Attribute { return Attribute::make( get: fn($v) => ucwords($v), set: fn($v) => strtolower($v), ); } // ✅ persists, ✅ in toArray(), ✅ works with dirty tracking For non-persisted properties → use PHP property hooks: // View helper — not in toArray() public string $statusBadgeClass { get => match($this->attributes['status']) { ... }; } // Runtime flag public bool $sendEmailOnSave = false { set => $this->sendEmailOnSave = $value; } // Best of all: hooks on DTOs alongside your model class CreateInvoiceData // plain PHP class, not Model { public string $clientName { set => $this->clientName = trim($value); } } The complete decision table + working Invoice model combining all three systems (PHP Attributes for metadata, Attribute::make() for DB columns, property hooks for view helpers) — linked here. #PHP #PHP84 #Laravel #Eloquent #WebDevelopment #PropertyHooks medium.com/p/php-8-4-prop…
English
0
5
33
3.2K
Sadique Ali
Sadique Ali@apnahive·
Inertia.js v2 is a complete core rewrite. One architectural change — async requests — unlocked six features that weren't possible before. Here's what's new: 1. DEFERRED PROPS Inertia::defer(fn () => expensiveQuery()) Render the page instantly. Load heavy data in the background. Use with a skeleton fallback. LCP improves. Users stop waiting for data they might not even scroll to. 2. PREFETCHING Hover for 75ms → data prefetches → click feels instant. cacheFor='30s' for stale-while-revalidate. mount and mousedown modes too. 3. POLLING const { start, stop } = usePoll(5000, { only: ['notifications'] }) Dashboard data stays fresh. No WebSockets. Partial reload only — server load stays minimal. 4. WHENWVISIBLE Intersection Observer lazy loading. The query never runs unless the user scrolls to that section. 5. INFINITE SCROLL Inertia::merge(fn () => User::paginate(50)) scrolls through all pages. merge() appends instead of replacing. 6. HISTORY ENCRYPTION Inertia::clearHistory() on logout. Encrypts window.history state. Wipes it on logout. Sensitive data doesn't survive the back button on shared devices. Breaking changes are minimal: Laravel 10+ required, Vue 2 removed, partial reloads are now async (use onSuccess callbacks instead of assuming sync). Upgrade is 2 commands: npm install @inertiajs/vue3@^2.0 composer require inertiajs/inertia-laravel:^2.0 Full guide with working code for every feature — linked here. #Laravel #InertiaJS #Vue #React #WebDevelopment #PHP #Frontend medium.com/p/inertia-js-v…
English
0
0
13
483
Sadique Ali
Sadique Ali@apnahive·
Laravel shipped an official AI SDK on February 5, 2026. Here's what makes it different from raw OpenAI calls. The core unit is an Agent class: php artisan make:agent InvoiceAnalyst --structured Everything lives in one place — instructions, tools, output schema, provider config: #[Provider('anthropic')] #[Temperature(0.3)] class InvoiceAnalyst implements Agent, HasStructuredOutput { public function instructions(): string { … } public function tools(): iterable { return [new GetOverdueInvoices, new WebSearch]; } public function schema(JsonSchema $schema): array { return [ 'risk_level' => $schema->string()->enum(['low','medium','high'])->required(), 'outstanding' => $schema->number()->required(), ]; } } Eight capabilities built in: → Streaming — .stream() pushes SSE to Livewire / Inertia → Structured output — $response['risk_level'] directly → Tools — DB queries, WebSearch, FileSearch → Background queuing — .queue()->then(fn…) — no timeouts → Conversation memory — implements Conversational → Provider failover — [Lab::Anthropic, Lab::OpenAI, Lab::Gemini] → Testable fakes — InvoiceAnalyst::fake() — schema-matched, no API calls → Anonymous agents — agent(instructions:…) for one-offs The relationship to Prism (the community package): same as query builder to Eloquent. Prism = raw calls. Laravel AI SDK = agents, memory, structured output, testing on top. Six providers: OpenAI, Anthropic, Gemini, Groq, xAI, Ollama (local). Swap in one line. Full guide — every pattern with working InvoiceAnalyst code from install to test — linked here. #Laravel #AI #PHP #Laravel13 #WebDevelopment #OpenAI #Anthropic medium.com/p/laravels-off…
English
0
0
18
1.4K
Sadique Ali
Sadique Ali@apnahive·
PHP 8.4 shipped in November 2024. Most developers are still writing getters and setters from muscle memory. Property hooks make them obsolete. Here's what they look like: BEFORE: private string $email; public function getEmail(): string { return $this->email; } public function setEmail(string $email): void { if (!filter_var($email, FILTER_VALIDATE_EMAIL)) throw… $this->email = strtolower($email); } AFTER: public string $email { set(string $v) { if (!filter_var($v, FILTER_VALIDATE_EMAIL)) throw… $this->email = strtolower($v); } } Same validation. Same normalisation. Half the code. The logic lives with the property instead of scattered across methods. Five patterns to know: 1. get hook — override reads (computed/formatted values) 2. set hook — override writes (validation, normalisation) 3. Virtual properties — no backing storage, computed from other props 4. private(set) — public read, private write (no more readonly workarounds) 5. Interface hooks — declare { get; } or { set; } as contracts Two things nobody mentions: → readonly and hooks are incompatible. Use private(set) instead. → static properties can't have hooks. Instance only. Full guide with every pattern, the asymmetric visibility combinations, interface hooks, and real-world Laravel DTO + value object examples — linked here. #PHP #PHP84 #Laravel #Laravel13 #ObjectOrientedProgramming #WebDevelopment medium.com/p/php-8-4-prop…
English
0
4
36
4.1K
Sadique Ali
Sadique Ali@apnahive·
@realAnabeto There is also free read link just below the image. Use it to read
English
0
0
1
34
Sadique Ali
Sadique Ali@apnahive·
Five Laravel releases landed in roughly seven days. I've been covering every one. Here's what they look like when you line them up. Laravel 13 → PHP Attributes on models. Static declarations instead of runtime properties. Cloud CLI GA → cloud deploy. 28 seconds. Your entire deploy workflow is three terminal commands. Nightwatch MCP → AI agent ↔ production errors. Zero context switches when things break. NativePHP v3 → MIT licensed. Free forever. iOS and Android with the Laravel stack you know. laravel/mcp → routes/ai.php. 8.8M installs. Your app gets a fourth entry point for AI clients. That's not five separate improvements to five separate things. That's five answers to the same question: what does a Laravel application look like in a world where AI is the primary interface? Models → Static declarations Deploy → 28 seconds. Terminal. AI clients → routes/ai.php Mobile → Free. MIT. Laravel. Debugging → Zero context switches Laravel is being built, consciously and deliberately, as a framework for the agentic era. That's not hype. It's architecture. When you add routes/ai.php to your application, you're not bolting on an AI feature — you're adding a new interface layer, the same way routes/api.php added a machine-readable interface layer in the 2010s. The PHP elephant isn't going anywhere. It's just getting a lot more places to go. #Laravel #PHP #AI #WebDevelopment #OpenSource #Laravel13 #MCP #NativePHP medium.com/p/laravel-13-c…
English
1
2
18
1.9K
Dieter Frei
Dieter Frei@dfrei84·
@apnahive So now we write all the code within the attributrs?
English
1
0
1
115
Sadique Ali
Sadique Ali@apnahive·
Laravel 13 ships 9 PHP Attributes for Eloquent models. Here's every single one. Count the lines before your first method on any model you wrote last year. Five? Eight? Ten? Laravel 13 (PR #58578) replaces that wall of protected $ declarations with native PHP attributes: #[Table('users', key: 'user_id', keyType: 'string', incrementing: false)] #[Connection('mysql')] #[Fillable('name', 'email', 'password')] #[Hidden('password', 'remember_token')] #[Appends('full_name')] class User extends Authenticatable { ... } All 9 model attributes: → #[Table] — table name, primary key, keyType, incrementing (4-in-1) → #[Fillable] — mass-assignable fields → #[Guarded] — protected fields → #[Unguarded] — disable mass-assignment protection entirely (attribute-only!) → #[Hidden] — exclude from serialisation → #[Visible] — whitelist serialised fields → #[Appends] — add computed attributes → #[Connection] — database connection → #[Touches] — touch related timestamps Three things nobody is telling you: 1. #[Unguarded] is attribute-only — there's no $guarded = [] equivalent that fully disables protection. New capabilities are landing as attributes first. 2. Attributes on traits DON'T propagate to the consuming class. Keep $primaryKey, $keyType, $incrementing in traits. Use attributes only on final model classes. 3. None of this is breaking. Mix attributes and properties freely. Migrate one model at a time. (Note: $casts stays as a property — no #[Cast] attribute yet.) Full guide with complete before/after User model, edge cases, and migration strategy in the article. #Laravel #PHP #Eloquent #Laravel13 #PHPAttributes #WebDevelopment medium.com/p/php-attribut…
English
1
5
52
5.8K
Sadique Ali
Sadique Ali@apnahive·
@mikaelkraft Yes you can. However, just put it over GitHub and post about its features and usability over x, over and over again to get traffic over it.
English
1
0
1
43
Sadique Ali
Sadique Ali@apnahive·
NativePHP v3 just shipped — MIT licensed, free forever. Here's what that means for PHP developers. You can now build native iOS and Android apps with Laravel. No Swift. No Kotlin. No React Native. No license fee. The new plugin architecture means you install only what you need: FREE (MIT): ✓ Camera ✓ Share ✓ Dialog ✓ File ✓ Browser ✓ Network ✓ Device ✓ System ✓ Microphone PREMIUM (one-time purchase): $ Biometrics $ Geolocation $ Scanner $ SecureStorage $ Firebase The install flow is three artisan commands: php artisan native:install php artisan native:run ios php artisan native:watch # live reload on device Camera + Share in a Livewire component looks like this: Camera::capture(onSuccess: fn($path) => $this->photo = $path); Share::file(path: $this->photo); That's it. Tapping the button opens the native iOS camera. The share button opens the native share sheet. Standard Livewire. Standard Tailwind. No bridge code. The app runs PHP on-device with SQLite. No API to build. Works offline by default. For testing on a real device without App Store submission: php artisan native:run --jump Scan the QR code with the Jump app. Done. Full guide — install, EDGE components, Camera+Share code, SQLite setup, and when to use NativePHP vs React Native — in the article. #Laravel #PHP #iOS #Android #NativePHP #MobileApps #OpenSource medium.com/p/nativephp-v3…
English
8
41
224
17.5K