Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 12 additions & 3 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,30 @@ 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'),

'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:

Expand Down
37 changes: 33 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -28,21 +28,23 @@ 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
```

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

Expand Down Expand Up @@ -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:
Expand All @@ -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 ✨

Expand Down
Loading