JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "LinkPasswordController.php"

Full Path: /home/markqprx/iniasli.pro/app-20260222054312/Http/Controllers/LinkPasswordController.php
File size: 680 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace App\Http\Controllers;

use Common\Auth\Validators\PasswordIsValid;
use Common\Core\BaseController;

class LinkPasswordController extends BaseController
{
    public function __invoke()
    {
        $data = $this->validate(request(), [
            'linkeableType' => 'required|string',
            'linkeableId' => 'required|int',
        ]);

        $namespace = modelTypeToNamespace($data['linkeableType']);
        $model = app($namespace)->find($data['linkeableId']);

        $this->validate(request(), [
            'password' => ['required', new PasswordIsValid($model->password)],
        ]);

        return $this->success(['matches' => true]);
    }
}