<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>

<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>

## About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).

Laravel is accessible, powerful, and provides tools required for large, robust applications.

## Learning Laravel

Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

In addition, [Laracasts](https://laracasts.com) contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

You can also watch bite-sized lessons with real-world projects on [Laravel Learn](https://laravel.com/learn), where you will be guided through building a Laravel application from scratch while learning PHP fundamentals.

## Agentic Development

Laravel's predictable structure and conventions make it ideal for AI coding agents like Claude Code, Cursor, and GitHub Copilot. Install [Laravel Boost](https://laravel.com/docs/ai) to supercharge your AI workflow:

```bash
composer require laravel/boost --dev

php artisan boost:install
```

Boost provides your agent 15+ tools and skills that help agents build Laravel applications while following best practices.

## OpenSSL Legacy Provider (NativePHP desktop builds)

The Windows PHP binary bundled by NativePHP (`vendor/nativephp/desktop/resources/build/php/` after extraction) ships its own `extras/ssl/openssl.cnf` and `extras/ssl/legacy.dll` next to `php.exe`. That `openssl.cnf` already activates the **legacy provider** (`legacy_sect`) by default — it enables older algorithms/ciphers (RC2, RC4, DES, etc.) that OpenSSL 3.x disables unless explicitly loaded. This matters here because signing/verifying against older certificates (e.g. legacy-encrypted `.p12`/`.pfx` files) depends on it.

Having the config file isn't enough on its own — OpenSSL only reads it when told to via environment variables:

- `OPENSSL_CONF` — path to `openssl.cnf`
- `OPENSSL_MODULES` — folder containing the provider DLLs (`legacy.dll`)

[nativephp/electron/electron-plugin/src/server/php.ts](nativephp/electron/electron-plugin/src/server/php.ts) sets both automatically (via `getOpenSslEnvironmentVariables()`) whenever it spawns PHP, pointing at the `extras/ssl` folder next to whichever `php.exe` is in use. No manual `php.ini` configuration is needed — this is not something PHP's `openssl.*` ini directives control.

### Files changed

- **[nativephp/electron/electron-plugin/src/server/php.ts](nativephp/electron/electron-plugin/src/server/php.ts)**
    - Imported `dirname` from `path` alongside the existing `join`.
    - Added `getOpenSslEnvironmentVariables()`: resolves `<php.exe dir>/extras/ssl/openssl.cnf`, returns `{}` if that file doesn't exist (so nothing changes on platforms/builds without it), otherwise returns `OPENSSL_CONF` (the cnf path) and `OPENSSL_MODULES` (its containing folder).
    - Spread that function's result into `getDefaultEnvironmentVariables()`, so every `callPhp`/`callPhpSync` invocation (dev server, scheduler, artisan calls) inherits the two env vars automatically.
- **[nativephp/electron/electron-plugin/dist/server/php.js](nativephp/electron/electron-plugin/dist/server/php.js)**
    - Same three changes applied by hand to the compiled output, since this project's `#plugin` import resolves straight to `dist/index.js` and there's no build step wired up in this repo to regenerate it from `src/`. Keep `src/php.ts` and `dist/server/php.js` in sync if either is edited again.

This was verified directly against the extracted binary — see the `openssl_encrypt` check below.

If you ever need to verify the legacy provider is actually active, run this against the extracted PHP binary:

```bash
php -r "var_dump(@openssl_encrypt('test', 'rc4', 'k'));"
```

- Without `OPENSSL_CONF`/`OPENSSL_MODULES` set → `bool(false)` (RC4 is a legacy cipher and fails as "unsupported").
- With them set → returns the encrypted string.

## Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

## Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

## Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.

## License

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

## Laravel native

php artisan optimize:clear
php artisan native:run -vvv

npm run build
php artisan native:build
