From 49518d2ae54e2354acf049cd01daf00a6a918b35 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 25 Sep 2026 17:19:36 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20document=20Laravel=2011=E2=80=9313=20in?= =?UTF-8?q?stall=20and=20storage=20upgrade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spell out the fork install, public-disk upload defaults, and how to move files left under storage/app/private after a Laravel 11 upgrade. Co-authored-by: Yeta Zulu --- CONTRIBUTING.md | 2 +- UPGRADE.md | 15 ++++++++++++--- readme.md | 37 +++++++++++++++++++++++++++++++++---- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index baa0a2b8..f073edad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ All contributions are welcomed. If it's your first time contributing to open sou ## Here are some points to consider: - Your PR must be making only a single change, if you want to suggest multiple features or fix multiple issues please open separate PRs. -- If you have an idea that will require a lot of work, make sure you suggest it in a new [issue](https://github.com/themsaid/wink/issues) first to make sure it's admired before investing time into it. +- If you have an idea that will require a lot of work, make sure you suggest it in a new [issue](https://github.com/drscript/wink/issues) first to make sure it's admired before investing time into it. - Keep your code clean. Clean means you're proud of how it turned out. ## How to contribute: diff --git a/UPGRADE.md b/UPGRADE.md index d00bf872..f6a73f08 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -15,13 +15,13 @@ In addition to this, make sure you render your posts and pages using `$post->con ## Laravel 11, 12, and 13 -This release requires PHP 8.3+ and Laravel 11, 12, or 13. +This release requires PHP 8.3+ and Laravel 11, 12, or 13. Install it from this fork (`themsaid/wink:dev-1.x`). Packagist `themsaid/wink` stops at Laravel 10. `Wink\WinkAuthor` implements `getAuthPasswordName()` so the Laravel 11 authentication contract can resolve the password column. Route files import the `Route` facade directly, because a fresh Laravel 11+ application does not register global facade aliases. ### Published configuration -Laravel 11 and newer store the `local` filesystem disk in `storage/app/private`. Wink now defaults to the `public` disk so `php artisan storage:link` can serve uploads. If you already published `config/wink.php`, update these values: +Laravel 11 and newer store the `local` filesystem disk in `storage/app/private`. Wink now defaults to the `public` disk and the `wink/images` path so `php artisan storage:link` can serve uploads. A previously published `config/wink.php` keeps the old defaults (`local` and `public/wink/images`) until you change them. Update the defaults in that file: ```php 'storage_disk' => env('WINK_STORAGE_DISK', 'public'), @@ -29,7 +29,16 @@ Laravel 11 and newer store the `local` filesystem disk in `storage/app/private`. 'storage_path' => env('WINK_STORAGE_PATH', 'wink/images'), ``` -Files uploaded with the previous defaults on Laravel 10 (`local` disk, path `public/wink/images`) already live in `storage/app/public/wink/images`, which is the same directory as the new defaults. If a Laravel 11+ app stored uploads under `storage/app/private/public/wink/images`, move that directory to `storage/app/public/wink/images`. +Or set them in `.env`: + +``` +WINK_STORAGE_DISK=public +WINK_STORAGE_PATH=wink/images +``` + +Files uploaded with the previous defaults on Laravel 10 (`local` disk, path `public/wink/images`) already live in `storage/app/public/wink/images`, which is the same directory as the new defaults. If a Laravel 11+ app stored uploads under `storage/app/private/public/wink/images`, move that directory to `storage/app/public/wink/images`. Run `php artisan storage:link` if `public/storage` does not already point at `storage/app/public`. + +Publish the `wink-assets` tag when you want fresh admin assets. Leave a customized `config/wink.php` in place. The `wink-config` tag overwrites that file. After updating, run: diff --git a/readme.md b/readme.md index f2b9256d..857f048d 100644 --- a/readme.md +++ b/readme.md @@ -17,7 +17,7 @@ Dark & Light modes available so everyone is happy 😁 Wink uses a separate database connection and authentication system so that you don't have to modify any of your project code. -Packagist `themsaid/wink` stops at Laravel 10. Install this fork from GitHub: +Packagist `themsaid/wink` stops at Laravel 10. Install this fork from GitHub. Add a VCS repository to your application's `composer.json`: ```json "repositories": [ @@ -28,13 +28,15 @@ Packagist `themsaid/wink` stops at Laravel 10. Install this fork from GitHub: ] ``` +Then run these commands in the root of your Laravel app: + ```sh composer require themsaid/wink:dev-1.x php artisan wink:install php artisan storage:link ``` -**Configure the database connection** wink is going to be using in `config/wink.php`. Then run: +**Configure the database connection** wink is going to be using in `config/wink.php`. That file reads `WINK_DB_CONNECTION` and defaults to a connection named `wink`. Point it at a connection you already have, or add a `wink` connection in `config/database.php`. Then run: ```sh php artisan wink:migrate @@ -42,7 +44,7 @@ php artisan wink:migrate Head to `yourproject.test/wink` and use the provided email and password to log in. -Uploaded images use the `public` disk and are stored in `storage/app/public/wink/images`. `storage:link` serves that directory. On Laravel 11 and newer the `local` disk points at `storage/app/private`, so leave `storage_disk` set to `public` unless you intend to use a private or S3 disk. +Uploaded images use the `public` disk and the `wink/images` path, so files land in `storage/app/public/wink/images`. `storage:link` serves that directory. On Laravel 11 and newer the `local` disk points at `storage/app/private`, so leave `storage_disk` set to `public` unless you intend to use a private or S3 disk. ## Uploading to S3 @@ -83,6 +85,33 @@ php artisan wink:migrate php artisan vendor:publish --tag=wink-assets --force ``` +Leave `config/wink.php` in place if you have already customized it. Publishing the `wink-config` tag overwrites that file. + +## Upgrade notes + +Coming from older Wink or Laravel 10? This fork requires PHP 8.3+ and Laravel 11, 12, or 13. Require `themsaid/wink:dev-1.x` from this repository. `composer require themsaid/wink` without the VCS repository installs the Packagist release, which stops at Laravel 10. + +A previously published `config/wink.php` keeps the old upload defaults (`local` disk and `public/wink/images`) until you change them. Update the defaults in that file: + +```php +'storage_disk' => env('WINK_STORAGE_DISK', 'public'), + +'storage_path' => env('WINK_STORAGE_PATH', 'wink/images'), +``` + +Or set them in `.env`: + +``` +WINK_STORAGE_DISK=public +WINK_STORAGE_PATH=wink/images +``` + +On Laravel 10 those old defaults already stored files in `storage/app/public/wink/images`. That is the same directory the new defaults use, so updating the config is enough. + +On Laravel 11 and newer the `local` disk root is `storage/app/private`. If uploads landed in `storage/app/private/public/wink/images`, move that folder to `storage/app/public/wink/images`. Run `php artisan storage:link` if `public/storage` does not already point at `storage/app/public`. + +Then run the update commands above. More detail is in the [upgrade guide](UPGRADE.md). + ## Displaying your content Wink is faceless, it doesn't have any opinions on how you display your content in your frontend. You can use the wink models in your controllers to display the different resources: @@ -97,7 +126,7 @@ To display posts and pages content, use `$post->content` instead of `$post->body ## Credits - [Mohamed Said](https://github.com/themsaid) -- [All contributors](https://github.com/themsaid/wink/contributors) +- [All contributors](https://github.com/drscript/wink/contributors) Special thanks to [Caneco](https://twitter.com/caneco) for the logo ✨