Changeset e6c1f87 for app/Http/Requests


Ignore:
Timestamp:
10/18/21 19:54:18 (3 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
develop, master
Children:
b9c4a92
Parents:
bd9e8e3
Message:

added pagination, is_important

Location:
app/Http/Requests/Dashboard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Requests/Dashboard/DocumentRequest.php

    rbd9e8e3 re6c1f87  
    33namespace App\Http\Requests\Dashboard;
    44
     5use App\Models\Department;
    56use App\Models\Document;
    67use App\Models\FileType;
     
    3839                    $arch_id = $this->request->get('arch_id');
    3940                    $deptId = explode('/', $arch_id)[0];
    40                     if ($deptId !== $this->request->get('department')) {
    41                         $fail("Dept id error");
     41                    if ($deptId !== Department::find($this->request->get('department'))->code) {
     42                        $fail("Document Archive ID field format is invalid");
    4243                    }
    4344                }
  • app/Http/Requests/Dashboard/UsernameSettingsRequest.php

    rbd9e8e3 re6c1f87  
    3535        $response = redirect()
    3636            ->route('dashboard.settings.index')
    37             ->with(['active_tab' => 'security'])
     37            ->withInput(['active_tab' => 'security'])
    3838            ->withErrors($validator);
    3939
    40         throw (new ValidationException($validator, $response))
     40        throw (new ValidationException($validator))
    4141            ->errorBag($this->errorBag)
    4242            ->redirectTo($this->getRedirectUrl());
Note: See TracChangeset for help on using the changeset viewer.