<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/vendor/feed/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
                        <id>https://laravel.io/forum/feed</id>
                                <link href="https://laravel.io/forum/feed" rel="self"></link>
                                <title><![CDATA[Laravel.io Forum RSS Feed]]></title>
                    
                                <subtitle>The RSS feed for the Laravel.io forum contains a list of all threads posted by community members.</subtitle>
                                                    <updated>2026-05-09T10:35:28+00:00</updated>
                        <entry>
            <title><![CDATA[Multi-Tenant Laravel SaaS Starter Kit (Laravel 13 + Modular]]></title>
            <link rel="alternate" href="https://laravel.io/forum/multi-tenant-laravel-saas-starter-kit-laravel-13-modular" />
            <id>https://laravel.io/30821</id>
            <author>
                <name><![CDATA[Abdur Rahaman]]></name>
            </author>
            <summary type="html">
                <![CDATA[I built a Multi-Tenant SaaS Starter Kit using Laravel 13, and it’s something I wish I had when I first started building SaaS applications.

Most SaaS projects usually start the same way—you set up authentication, multi-tenancy, database separation, modular structure, and a lot of boilerplate code before you even get to the actual product idea. Over time, I realized I was rebuilding the same foundation again and again. So I decided to solve that properly by creating a reusable starter system.

This project uses Laravel 13 with stancl/tenancy for multi-database tenancy, where the central database manages tenants and domains, while each tenant gets its own isolated database (like fcom_tenant_demo). This ensures complete data separation and a clean, scalable SaaS structure from day one.

To make things more organized, I also integrated nwidart/laravel-modules, so the system stays modular. Each module can have its own central and tenant migrations, which keeps the codebase clean and maintainable even as the project grows.

One of the things I focused on heavily was developer experience. I added custom Artisan commands like tenant:create, which automatically creates a tenant, sets up the domain, generates the database, and runs all required migrations in one go. There are also commands to generate and run module migrations separately for central and tenant contexts, which makes development much faster and more structured.

The idea behind this starter kit is simple: instead of spending days or weeks setting up SaaS architecture every time, you can start directly from a solid foundation and focus on building your actual product features.

It’s designed for developers who want to build serious SaaS applications like dashboards, CRM systems, ERP platforms, or any multi-company system without reinventing the core architecture every time.

If you're working with Laravel and planning to build a SaaS product, this setup can save you a lot of time and give you a clean, scalable starting point.

👉 GitHub: https://github.com/abdurrahamanbabu/multi-tenancy]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Looking for New Opportunities PHP (Laravel) Developer]]></title>
            <link rel="alternate" href="https://laravel.io/forum/looking-for-new-opportunities-php-laravel-developer" />
            <id>https://laravel.io/30820</id>
            <author>
                <name><![CDATA[Abdur Rahaman]]></name>
            </author>
            <summary type="html">
                <![CDATA[**### Open to New Opportunities | PHP (Laravel) Developer**


I’m currently looking for a new opportunity as a PHP/Laravel Developer.
With 5+ years of professional experience, I have developed and delivered a wide range of web applications, including:
• E-commerce Platforms
• Learning Management Systems (LMS)
• Point of Sale (POS) Systems
• School Management Systems
• Custom Business Applications

I also have extensive experience in developing and maintaining premium Codecanyon products.


** Core Expertise:**

PHP, Laravel, MySQL

REST API Development & Integration

Modular Architecture

Repository Pattern

JavaScript, jQuery, Bootstrap

Git, GitHub, GitLab

Performance Optimization

Agile/Scrum Methodology

Third-party API & Payment Gateway Integration

I’m passionate about building scalable, secure, and high-performance applications that solve real business problems.

If your company is hiring, or if you know of any suitable opportunities, I would greatly appreciate your support. Please feel free to connect with me or send me a message.
Thank you!]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Can you share some real websites using Laravel]]></title>
            <link rel="alternate" href="https://laravel.io/forum/can-you-share-some-real-websites-using-laravel" />
            <id>https://laravel.io/30798</id>
            <author>
                <name><![CDATA[Serena]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hi Guys,

Good day! 

Can you share some real websites using Laravel? 

And If I have a website, how do I know if there's any tags or signs that shows it's using Laravel? AI tells me to check like this document.cookie.includes('laravel_session')  to see if such a cookie...is that true?

Thanks:)]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Feedback on a lightweight Laravel rule enginepackagesppa]]></title>
            <link rel="alternate" href="https://laravel.io/forum/feedback-on-a-lightweight-laravel-rule-enginepackagesppa" />
            <id>https://laravel.io/30819</id>
            <author>
                <name><![CDATA[lei]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hi everyone,

I’ve been working on a small open-source PHP package called RuleFlow PHP:

https://github.com/yl0711-coder/ruleflow-php

It is a lightweight Decision List rule engine for PHP and Laravel applications.

The problem I’m trying to solve is common in business systems: risk checks, content moderation, marketing eligibility, and order review logic often start as simple if/else
blocks, but eventually become scattered across controllers, services, jobs, validators, and domain services.

RuleFlow keeps these business decisions as structured rules that can be:

- reviewed before deployment
- validated with an Artisan command
- tested in PHPUnit
- explained through trace() and explain()
- integrated with Laravel config and cache

It is not trying to be Drools, a RETE engine, a workflow engine, or a visual rule management platform. The goal is much smaller: make medium-sized Laravel business rules more
deterministic, readable, testable, and explainable.

Laravel integration currently includes:

- service provider auto-discovery
- config publishing
- facade support
- Laravel cache store support
- php artisan ruleflow:validate
- compatibility tests for Laravel 10, 11, and 12

I would really appreciate feedback from Laravel developers:

- Does this solve a real problem you have seen in Laravel projects?
- Is the API simple enough?
- Are the examples close to real-world usage?
- What would block you from using something like this in an internal business system?

Thanks.]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Laravel Developer]]></title>
            <link rel="alternate" href="https://laravel.io/forum/laravel-developer" />
            <id>https://laravel.io/30817</id>
            <author>
                <name><![CDATA[Noghe]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hello everyone,

I am a **Laravel developer currently looking for opportunities to work on real-world projects**.

I am open to collaborating on Laravel projects of any size, whether short-term or long-term.

My skills include:
- Laravel backend development (APIs, CRUD, dashboards)
- Bug fixing and performance improvements
- Database design and optimization (MySQL)
- Frontend integration (HTML, CSS, JavaScript basics)
- Working with Git in collaborative environments

I already have practical experience through a freelance contract where I worked on a Laravel-based project. This helped me develop real production-level skills, not just theory.

I am motivated, disciplined, and ready to contribute immediately to ongoing projects.

I am open to any fair compensation depending on the scope of the work. My main goal right now is to gain more experience while helping deliver real projects efficiently.

If you are working on a Laravel project and need a reliable developer, feel free to reach out.

Thank you for your time.
Email: juniornoghe@gmail.comjobbjoblbbl]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Fresh Laravel 13 install reports as Laravel 12]]></title>
            <link rel="alternate" href="https://laravel.io/forum/fresh-laravel-13-install-reports-as-laravel-12" />
            <id>https://laravel.io/30813</id>
            <author>
                <name><![CDATA[Peter Kidson]]></name>
            </author>
            <summary type="html">
                <![CDATA[Laravel Framework 12.53.0
Is this to be expected?]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[🚀 Introducing DBStan – Static Analysis for Database Queries]]></title>
            <link rel="alternate" href="https://laravel.io/forum/introducing-dbstan-static-analysis-for-database-queries" />
            <id>https://laravel.io/30812</id>
            <author>
                <name><![CDATA[Dhanik Keraliya]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hi everyone 👋

I’d like to share a package I’ve been working on called DBStan, designed to improve the reliability and quality of database interactions in Laravel applications.

🔍 Problem

While Laravel provides excellent tools for working with databases, it’s still easy to:

Write inefficient or problematic queries

Miss potential issues before runtime

Lack visibility into query structure during development

💡 Solution

DBStan aims to bring static analysis for database queries, similar to what Larastan does for code quality.

⚙️ What DBStan Does

Analyzes database queries in your Laravel application

Helps detect potential issues early

Encourages better query practices

Improves overall application performance and stability

📦 Package Link

https://packagist.org/packages/itpathsolutions/dbstan

🛠️ Installation
composer require itpathsolutions/dbstan

Demo Video

[https://www.youtube.com/watch?v=Xv5m10R3wmc](https://www.youtube.com/watch?v=Xv5m10R3wmc)

🎯 Goal

The goal of this package is to help Laravel developers catch database-related issues early in the development cycle and promote best practices.

I’d really appreciate any feedback, suggestions, or contributions from the community 🙌

Thanks!]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Anti-Swagger]]></title>
            <link rel="alternate" href="https://laravel.io/forum/anti-swagger" />
            <id>https://laravel.io/30805</id>
            <author>
                <name><![CDATA[Myat Kyaw Thu]]></name>
            </author>
            <summary type="html">
                <![CDATA[If you’re a **Laravel developer**, you know the pain: you finish a feature, but then you spend another 30 minutes updating YAML files or adding messy docblock annotations just so the frontend team knows how the API works.

I built **Laravel API Visibility** to change that. No annotations, no configuration, and zero manual work.
What it does:
✅ Automatic Documentation: Scans your routes and controllers instantly.
✅ Static Analysis: Uses PHP Reflection to "read" your code and predict responses without even running an HTTP request.
✅ Postman Export: One click to generate a full Postman collection, pre-wired with headers and auth.
✅ FormRequest Support: Automatically detects your validation rules and generates example payloads.

It’s lightweight, dark-mode friendly, and stays out of your production environment by default.

Check it out on GitHub: https://github.com/myat-kyaw-thu/laravel-api-visibility

I'd love to hear what the Laravel community thinks!]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[How do you handle translations in large Laravel apps?]]></title>
            <link rel="alternate" href="https://laravel.io/forum/how-do-you-handle-translations-in-large-laravel-apps" />
            <id>https://laravel.io/30804</id>
            <author>
                <name><![CDATA[Jayesh Patel]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hi everyone 👋

I’ve been working on a Laravel project where localization started getting messy—extracting keys, organizing files, and translating everything manually.

Curious how you all handle this in real-world apps?

Do you:
- manage translations manually?
- use any packages/tools?
- or have some automation workflow?

I’ve been experimenting with an AI-based approach to automate parts of this, and it’s been interesting so far.

Would love to hear your approaches and best practices.]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Laravel Threat Detection Layer]]></title>
            <link rel="alternate" href="https://laravel.io/forum/laravel-threat-detection-layer" />
            <id>https://laravel.io/30788</id>
            <author>
                <name><![CDATA[Jayanta Kumar Nath]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hey everyone,

I've been running a SaaS for a couple of years and kept seeing suspicious patterns — SQL injection probes, scanner bots hitting my login form, someone scanning for .env files. Had zero real-time visibility into any of it.

So I extracted the detection layer from my production app into a standalone package: laravel-threat-detection.

`composer require jayanta/laravel-threat-detection`

One middleware, zero config. It logs SQL injection, XSS, RCE, directory traversal, SSRF, scanner bots (sqlmap, nikto, burp suite, nmap), DDoS patterns, Log4Shell — 130+ patterns total — to a threat_logs table.

The key thing: it never blocks anything. Every request goes through normally. Purely passive, so zero risk of false positives breaking your app.

What I spent the most time on:

Evasion resistance — payloads are normalized before matching so UNION/**/SELECT and double URL encoding (%2527) don't slip through.

Confidence scoring — each threat gets a 0–100 score based on match count, where the pattern was found (query string scores higher than body), and user-agent signals.

Also ships with:
- Dark-mode dashboard (no build step, Alpine + Tailwind CDN)
- Slack alerts for high-severity threats
- 15 REST API endpoints
- Geo-enrichment (country, ISP, cloud provider)
- CSV export

GitHub: https://github.com/jay123anta/laravel-threat-detection

Packagist: https://packagist.org/packages/jayanta/laravel-threat-detection

Would love to hear how others handle security visibility in Laravel — are you using anything for this or relying purely on server logs?]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Laravel Tailwind tables (like Yajra, no Livewire)]]></title>
            <link rel="alternate" href="https://laravel.io/forum/laravel-tailwind-tables-like-yajra-no-livewire" />
            <id>https://laravel.io/30789</id>
            <author>
                <name><![CDATA[Tarcísio Santos]]></name>
            </author>
            <summary type="html">
                <![CDATA[Good evening, everyone!
I’m looking for recommendations for libraries or packages to create tables in Laravel using Tailwind CSS. Previously, I used Yajra Laravel DataTables with Bootstrap, but now I want to switch to a solution that works well with Tailwind and, preferably, doesn’t rely on Livewire.
Does anyone have suggestions for packages or approaches that can replace Yajra while keeping pagination, sorting, and filtering functionality?
Thanks!]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Laravel Email Preference Center Package]]></title>
            <link rel="alternate" href="https://laravel.io/forum/laravel-email-preference-center-package" />
            <id>https://laravel.io/30795</id>
            <author>
                <name><![CDATA[Lenos Christodoulou]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hi everyone 👋

  I recently built and open-sourced a Laravel package that adds a **complete email preference center** to your application.

  In many apps the only option users have is **"unsubscribe from everything."**
  That often means losing users who only wanted *fewer* emails, not zero.

  This package lets users control **exactly what emails they receive and how often**.

  ## What it does

  * 📬 **Smart notification channel** – drop-in replacement for `'mail'`, automatically routes notifications based on user preferences
  * 🎛️ **Self-service preference center UI** – ready-to-use Blade interface where users manage email categories and frequency
  * 🔗 **One-click unsubscribe** – RFC 8058 compliant (works with Gmail & Apple Mail)
  * 📋 **Digest batching** – automatic daily or weekly digests
  * 🔒 **GDPR consent logging** – records preference changes with IP, user agent, and timestamp
  * 🧩 **Polymorphic support** – works with any notifiable model, not just `User`
  * ⚡ **Flexible category declaration** – attribute, interface, or config mapping

  ## Example usage

  ```php
  use Lchris44\EmailPreferenceCenter\Attributes\EmailCategory;

  #[EmailCategory('marketing')]
  class NewsletterNotification extends Notification
  {
      public function via(object $notifiable): array
      {
          return ['email-preferences'];
      }
  }
  ```

  The package will automatically check the user's preferences and decide whether to:

  * send immediately
  * queue to a digest
  * skip the notification

  ## Installation

  ```bash
  composer require lchris44/laravel-email-preference-center
  ```

  ## Links

  GitHub: https://github.com/lchris44/laravel-email-preference-center

  Documentation: https://darkorchid-spoonbill-752711.hostingersite.com/

  ---

  I'd love feedback from the community — especially on:

  * the API design
  * real-world use cases
  * features you think are missing

  Thanks!]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Target DeviceUserCodeViewResponse is not instantiable]]></title>
            <link rel="alternate" href="https://laravel.io/forum/target-deviceusercodeviewresponse-is-not-instantiable" />
            <id>https://laravel.io/30787</id>
            <author>
                <name><![CDATA[Craig1231]]></name>
            </author>
            <summary type="html">
                <![CDATA[I am trying to add Laravel Passport to my project following the documentation.

When I try to navigate to [myproject]/oauth/device, it says the following...

```
Illuminate\Contracts\Container\BindingResolutionException
vendor/laravel/framework/src/Illuminate/Container/Container.php:1411
Target [Laravel\Passport\Contracts\DeviceUserCodeViewResponse] is not instantiable.
```

I have created the project using the Vue starter kit, but what am I missing? The documentation doesn't mention I need to implement DeviceUserCodeViewResponse anywhere.

Any help on this would be appreciated.]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Images not rendering in Laravel on Shared Hosting]]></title>
            <link rel="alternate" href="https://laravel.io/forum/images-not-rendering-in-laravel-on-shared-hosting" />
            <id>https://laravel.io/30782</id>
            <author>
                <name><![CDATA[Neha]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hi everyone,

I'm developing an ad marketplace where I generate PNG previews of Blade templates using an external API (HCTI). Everything works perfectly on localhost, but I'm facing a critical issue on my live server (Shared Hosting).

The Problem:

Images uploaded via Livewire (stored in storage/app/public/ads/content) are not appearing in the Blade templates on the live site.

Oddly, .AVIF images work in the generated previews, but .JPG and .PNG do not.

Standard asset('storage/...') calls return broken links across the entire site.

What I've Tried:

I attempted to run php artisan storage:link, but my host restricts the symlink() PHP function, resulting in a 500 Server Error.

I've updated my .env APP_URL to the live domain and cleared the config cache.

I tried converting images to Base64 strings before sending them to the API. This fixed the preview generation for some files, but the rest of the website is still "image-blind".

Current Theory: > It seems to be a Base Path issue where the live server cannot resolve the virtual public/storage directory because the physical symlink is missing/blocked.

Has anyone found a robust way to serve storage files on shared hosting without a symlink, or a way to force Laravel's asset() helper to point to the actual physical path?

Thanks in advance!]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Just Srarting - Help Needed.]]></title>
            <link rel="alternate" href="https://laravel.io/forum/just-srarting-help-needed" />
            <id>https://laravel.io/30781</id>
            <author>
                <name><![CDATA[Julie Kerr]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hi,

I am just starting to learn Laraval, I got a website done with a freelancer but I don't won't
to disturb him for small edits.

The Problem is I am not able to edit a single code on a page, It does not reflects on the website.

This is the register page https://mydomain.com/register at my domain, which I want to edit.
I have one file located here : public_html/resources/views/frontend/register.blade.php and 
which I edited, but the changes does not shows on the site.

Any help is appreciated.

Thanks]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Laravel Reverb and production builds in containers]]></title>
            <link rel="alternate" href="https://laravel.io/forum/laravel-reverb-and-production-builds-in-containers" />
            <id>https://laravel.io/30780</id>
            <author>
                <name><![CDATA[jon brookes]]></name>
            </author>
            <summary type="html">
                <![CDATA[HI Folks, 

forgive me if this is already answered, however my searches have not led me to similar yet. 

I'm building a Laravel application container for use in docker, k8s and similar environments with reverb and echo

I found in my use case, I needed to add to the broadcast configuration file modified options:

```
        'reverb' => [
            'driver' => 'reverb',
            'key' => env('REVERB_APP_KEY'),
            'secret' => env('REVERB_APP_SECRET'),
            'app_id' => env('REVERB_APP_ID'),
            'options' => [
                'host' => env('REVERB_API_HOST', '127.0.0.1'),
                'port' => env('REVERB_API_PORT', 9001),
                'scheme' => env('REVERB_API_SCHEME', 'http'),
                'useTLS' => env('REVERB_API_SCHEME', 'http') !== 'https',
            ],
            'client_options' => [
                // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
            ],
        ],
```
I set default values here of the localhost address, my own port I had configured reverb to run upon, http as the schema locally and for broadcasts and https for external. This , bearing in mid that I now have REVERB_HOST  set to an internet available URL. These can be overridden if required  but work for my app for now. 

I found that without these changes, sending messages from the app to be broadcast to users defaulted to use pusher or other related services, I guess the default for echo. This meant a 'page not found' error when sending broadcasts and nothing being sent to the users.

my question is then, is this a feature I did not fully understand or a potential bug in the config, resulting in a works on my laptop or is it by design ?  

Non the less, the above now gives me real time events in my self-hosted apps, which even now I find amazing to be a built in with any framework and making Laravel for me the best decision I made and only regret is I didn't start using it sooner than v10]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Laravel Cache facade not storing data in Redis, but Redis fa]]></title>
            <link rel="alternate" href="https://laravel.io/forum/laravel-cache-facade-not-storing-data-in-redis-but-redis-fa" />
            <id>https://laravel.io/30774</id>
            <author>
                <name><![CDATA[yahi]]></name>
            </author>
            <summary type="html">
                <![CDATA[Hi everyone 👋
I’m facing an issue with Laravel cache and Redis. Here are the details:
OS: Ubuntu
PHP: PHP 8.3
Laravel: 12
Redis: installed via apt and also tested with Docker

Redis PHP extension: php-redis installed

What I did:

Set Redis as cache store in .env:
CACHE_STORE=redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379

Cleared config cache:
php artisan optimize:clear

Verified in Tinker:
config('cache.default'); // returns "redis"

The problem:

Using the Redis facade works:
Redis::set('test', 'ok');

But the Cache facade does not store anything:
Cache::put('name', 'yahi', 300);
Cache::get('name'); // returns value, but key not visible in redis

I use jwt/tymon To generate token but go to dashboard token not provided]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Finding out our livewire version]]></title>
            <link rel="alternate" href="https://laravel.io/forum/finding-out-our-livewire-version" />
            <id>https://laravel.io/30766</id>
            <author>
                <name><![CDATA[robm]]></name>
            </author>
            <summary type="html">
                <![CDATA[I issue the command:
```
php artisan livewire --version
Larvel Framework 11.36.1
```

but I do not know what the livewire version


I also cannot use composer commands I cannot even find it on the machine file system


```
php artisan list 
 livewire
  livewire:attribute                    Create a new Livewire attribute class
  livewire:configure-s3-upload-cleanup  Configure temporary file upload s3 directory to automatically cleanup files older than 24hrs
  livewire:copy                         Copy a Livewire component
  livewire:delete                       Delete a Livewire component
  livewire:form                         Create a new Livewire form class
  livewire:layout                       Create a new app layout file
  livewire:make                         Create a new Livewire component
  livewire:move                         Move a Livewire component
  livewire:publish                      Publish Livewire configuration
  livewire:stubs                        Publish Livewire stubs
  livewire:upgrade                      Interactive upgrade helper to migrate from v2 to v3
```]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Wrong typing on Eloquent models]]></title>
            <link rel="alternate" href="https://laravel.io/forum/wrong-typing-on-eloquent-models" />
            <id>https://laravel.io/30767</id>
            <author>
                <name><![CDATA[Dani]]></name>
            </author>
            <summary type="html">
                <![CDATA[Why if I add a new **boolean** column via its corresponding migration... and I add also the PHPDoc on Eloquent model typing the "magic property" as **bool**... when I get the property's value I have an **'1' (string)** instead of true (boolean)?

![](https://i.ibb.co/whQyt4LY/Pasted-image-20260210091054.png)]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
            <entry>
            <title><![CDATA[Custom JavaScript video player bug]]></title>
            <link rel="alternate" href="https://laravel.io/forum/custom-javascript-video-player-bug" />
            <id>https://laravel.io/30765</id>
            <author>
                <name><![CDATA[Razvan]]></name>
            </author>
            <summary type="html">
                <![CDATA[I am working on a blogging application in Laravel 8, which I named "Brave CMS".

The CMS supports uploading video files (MP4). I have added a loading indicator to the player. The code I have so far is **[HERE](https://github.com/Ajax30/BraveCMS-2.0/pull/104)**.

### The player template:

```
<div class="video-container mb-3">
    <img src="{{ asset('images/articles/' . $article->image) }}" class="poster" />
    <div class="loading-spinner"><div class="spinner"></div></div>
    <video src="{{ asset('videos/articles/' . $article->video) }}" type="video/mp4"></video>

    <div class="controls-wrapper">
        <div class="progress-bar">
            <div class="progress"></div>
        </div>
        <ul class="video-controls">
            <li>
                <input type="button" name="play-pause" value="Play" class="play" />
            </li>
            @if (!empty($article->video))
                <li>
                    @if ($prev_video_article)
                        <a href="{{ url('/show/' . $prev_video_article->slug) }}" class="previous"
                            title="{{ 'Previous video: ' . $prev_video_article->title }}">
                            Previous
                        </a>
                    @endif
                </li>
                <li>
                    @if ($next_video_article)
                        <a href="{{ url('/show/' . $next_video_article->slug) }}" class="next"
                            title="{{ 'Next video: ' . $next_video_article->title }}">
                            Next
                        </a>
                    @endif
                </li>
            @endif
            <li class="mute-toggle unmuted">
                <input type="checkbox" name="mute" />
            </li>
            <li>
                <input type="range" min="0" max="1" step="0.01" class="volume-slider" />
            </li>
            <li class="timer">
                <span class="current-time"></span><span>/</span><span class="duration"></span>
            </li>
            <li class="playback-rate">
                <span class="rate_display">Normal</span>
                <div class="piker">
                    <ul class="dropdown-content" id="rate_selector">
                        <li data-rate="0.5">0.5x</li>
                        <li data-rate="0.75">0.75x</li>
                        <li data-rate="1">Normal</li>
                        <li data-rate="1.125">1.125x</li>
                        <li data-rate="1.5">1.5x</li>
                        <li data-rate="2">2x</li>
                    </ul>
                </div>
            </li>
            <li class="fullscreen-container">
                <input type="button" name="screen-toggler" value="Fullscreen" class="toggle-fullscreen" />
            </li>
        </ul>
    </div>
</div>
```


### JavaScript

```
document.addEventListener('DOMContentLoaded', () => {
  class VideoPlayer {
    constructor(container) {
      this.container = container;
      this.video = container.querySelector('video');
      this.poster = container.querySelector('.poster');
      this.spinner = container.querySelector('.loading-spinner');
      this.playBtn = container.querySelector('[name="play-pause"]');
      this.progressBar = container.querySelector('.progress-bar');
      this.progress = container.querySelector('.progress');
      this.currentTimeEl = container.querySelector('.current-time');
      this.durationEl = container.querySelector('.duration');
      this.volumeSlider = container.querySelector('.volume-slider');
      this.muteToggle = container.querySelector('.mute-toggle');
      this.muteCheckbox = this.muteToggle.querySelector('input');
      this.rateDisplay = container.querySelector('.rate_display');
      this.fullscreenBtn = container.querySelector('[name="screen-toggler"]');
      this.rateOptions = container.querySelectorAll('.playback-rate li');

      this.started = false;
      this.isTrying = false;
      this.wasPlayingBeforeSeek = false;

      this.init();
    }

    init() {
      this.bindEvents();
      this.updateProgress();
      this.updatePlayState();
    }

    formatTime(sec) {
      sec = Math.floor(sec || 0);
      const h = Math.floor(sec / 3600);
      const m = Math.floor((sec % 3600) / 60);
      const s = sec % 60;
      const pad = n => n.toString().padStart(2, '0');
      return h ? `${pad(h)}:${pad(m)}:${pad(s)}` : `${pad(m)}:${pad(s)}`;
    }

    showSpinner() { this.spinner.style.opacity = 1; }
    hideSpinner() { this.spinner.style.opacity = 0; }

    updatePlayState() {
      const paused = this.video.paused;
      this.playBtn.value = paused ? 'Play' : 'Pause';
      this.playBtn.classList.toggle('play', paused);
      this.playBtn.classList.toggle('pause', !paused);
    }

    updateProgress() {
      const dur = this.video.duration || 0;
      const cur = this.video.currentTime || 0;
      this.progress.style.width = dur ? (cur / dur) * 100 + '%' : '0%';
      this.currentTimeEl.textContent = this.formatTime(cur);
      this.durationEl.textContent = dur ? this.formatTime(dur) : '--:--';
    }

    async play() {
      if (!this.started) return;
      if (this.isTrying) return;

      this.isTrying = true;
      this.showSpinner();
      try { await this.video.play(); } catch {}
      this.hideSpinner();
      this.isTrying = false;
      this.updatePlayState();
    }

    togglePlayback() {
      if (!this.started) {
        this.started = true;
        this.poster.style.display = 'none';
        this.play();
        return;
      }
      this.video.paused ? this.play() : this.video.pause();
    }

    seek(e) {
      const rect = this.progressBar.getBoundingClientRect();
      const dur = this.video.duration || 0;
      if (!dur) return;

      this.wasPlayingBeforeSeek = !this.video.paused;
      this.video.currentTime = ((e.clientX - rect.left) / rect.width) * dur;
      this.updateProgress();

      if (!this.started) this.poster.style.display = 'none';
    }

    async handleSeeked() {
      this.hideSpinner();
      if (this.wasPlayingBeforeSeek) {
        try { await this.video.play(); } catch {}
      }
      this.updatePlayState();
    }

    bindEvents() {

      this.playBtn.addEventListener('click', () => this.togglePlayback());
      this.video.addEventListener('click', () => this.togglePlayback());
      this.progressBar.addEventListener('click', e => this.seek(e));

      this.volumeSlider.addEventListener('input', () => {
        this.video.volume = this.volumeSlider.value;
        this.video.muted = this.video.volume === 0;
        this.muteCheckbox.checked = this.video.muted;
        this.muteToggle.classList.toggle('muted', this.video.muted);
      });

      this.muteToggle.addEventListener('click', () => {
        this.video.muted = this.muteCheckbox.checked;
        this.muteToggle.classList.toggle('muted', this.video.muted);
      });

      this.fullscreenBtn.addEventListener('click', () => {
        this.container.classList.toggle('fullscreen');
        this.fullscreenBtn.classList.toggle('exit');
        if (!document.fullscreenElement) {
          this.container.requestFullscreen?.();
        } else {
          document.exitFullscreen?.();
        }
      });

      this.rateOptions.forEach(opt => {
        opt.addEventListener('click', () => {
          this.video.playbackRate = parseFloat(opt.dataset.rate);
          this.rateDisplay.textContent =
            this.video.playbackRate === 1 ? 'Normal' : this.video.playbackRate + 'x';
        });
      });

      ['waiting', 'stalled', 'seeking']
        .forEach(e => this.video.addEventListener(e, () => this.showSpinner()));

      this.video.addEventListener('seeked', () => this.handleSeeked());
      this.video.addEventListener('playing', () => { this.hideSpinner(); this.updatePlayState(); });
      this.video.addEventListener('pause', () => this.updatePlayState());
      this.video.addEventListener('timeupdate', () => this.updateProgress());
      this.video.addEventListener('loadedmetadata', () => this.updateProgress());
      this.video.addEventListener('ended', () => {
        this.started = false;
        this.poster.style.display = '';
        this.updatePlayState();
      });

      document.addEventListener('fullscreenchange', () => {
        if (!document.fullscreenElement) {
          this.container.classList.remove('fullscreen');
          this.fullscreenBtn.classList.remove('exit');
        }
      });
    }
  }

  document.querySelectorAll('.video-container')
    .forEach(container => new VideoPlayer(container));
});
```

### The problem

The problem I am facing is this: when the video is very large (150 MB or more), it gets blocked, and trying to unblock it by seeking to an already-buffered point on the timeline fails.

### Questions

1. What causes this bug? 
2. What is a reliable way to allow the user to unblock a video by navigating back in the timeline?]]>
            </summary>
                                    <updated>2026-05-09T10:35:28+00:00</updated>
        </entry>
    </feed>
