app/Requests/StoreUpdateActivityRequest.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()
    {
        $id = $this->segment(2);
        return [
            'name' => "required|min:3|max:255|unique:activities,name,{$id},id",
            'description' => 'required|min:3|max:10000',
        ];
    }
public function rules ( ) { $ id = $ this -> segment ( 2 ) ; return [ 'name' => " required|min:3|max:255|unique:activities,name, { $ id } ,id " , 'description' => 'required|min:3|max:10000' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .