Changeset f457265 for app/Http/Requests


Ignore:
Timestamp:
02/24/21 21:58:42 (4 years ago)
Author:
Berat Kjufliju <kufliju@…>
Branches:
master
Children:
ff9da8b
Parents:
0c07a90
Message:

ADD technoweek offer, companies

Location:
app/Http/Requests
Files:
1 added
1 edited

Legend:

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

    r0c07a90 rf457265  
    2525    public function rules()
    2626    {
    27         return [
     27        $rules = [
    2828            "name" => "required|alpha|min:2|max:255",
    2929            "surname" => "required|alpha|min:2|max:255",
     
    3232            "email" => "required|string|email|max:255|unique:users",
    3333            "username" => "required|alpha_dash|min:8|unique:users,username",
    34             "userRole" => "required|exists:roles,id"
    3534        ];
     35
     36        if (!$this->has("company_id")) {
     37            $rules["userRole"] = "required|exists:roles,id";
     38        }
     39
     40        return $rules;
    3641    }
    3742
Note: See TracChangeset for help on using the changeset viewer.