app/Http/Requests/ApiCustomerRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'first_name' => 'required|string',
            'last_name' => 'required|string',
            'username' => 'required|string|unique:customers,username,' . $this->user()->id
        ];
    }
public function rules ( ) { return [ 'first_name' => 'required|string' , 'last_name' => 'required|string' , 'username' => 'required|string|unique:customers,username,' . $ this -> user ( ) -> id ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .