felixkiss / uniquewith-validator

Custom Laravel Validator for combined unique indexes
MIT License
389 stars 129 forks source link

Update for Laravel 8.0 #117

Closed wimil closed 3 years ago

lloricode commented 4 years ago

resolve #116

makroxyz commented 4 years ago

Please rmerge pull request and release.

Thanx

dom235 commented 4 years ago

push 💘

EmilMoe commented 4 years ago

Is this project dead?

elijahchancey commented 4 years ago

Please merge the laravel 8 support. Thanks!

r8928 commented 3 years ago

@felixkiss Please merge

EmilMoe commented 3 years ago

You can omit this package:

return [
    'name' => 'string',
    'email' => 'email',
    'partner_id' => Rule::unique('users', 'partner_id')->where(function($query) {
        $query->where('client_id', User::findOrFail($this->user)->client_id)
            ->where('id', '<>', $this->user);
    }),
];

I tried to sum up a solution here: https://blog.cloudmonitor.dk/laravel-unique-validation-with-another-column

elijahchancey commented 3 years ago

please do this when you can, thanks!

EM-LilianaIturribarria commented 3 years ago

@felixkiss when is this going to be ready?

felixkiss commented 3 years ago

Merged #116 Released in 3.4.1